
Head Command in Linux With Examples - GeeksforGeeks
Feb 24, 2025 · Learn how to use the head command in Linux to display the first few lines of files. This guide covers options like -n, -c, and more, with real-world examples and use cases.
head (Unix) - Wikipedia
head is a program on Unix and Unix-like operating systems used to display the beginning of a text file or piped data. The command syntax is: By default, head will print the first 10 lines of its input to the standard output. The number of lines printed may be changed with a command line option.
Linux Head Command | Linuxize
Feb 8, 2021 · The head command prints the first lines (10 lines by default) of one or more files or piped data to standard output. This article explains how to use the Linux head utility through practical examples and detailed explanations of the most common command options.
Head Command in Linux [5 Essential Examples] - Linux Handbook
Head is another way to view text file in Linux. You can use head command to print a specified number of lines from the beginning of the file. Here’s the syntax of the head command: head [option] [filename] 7 examples of head command. Let’s learn how to use the head command in Linux with practical examples.
head command in Linux with examples - LinuxConfig
Aug 26, 2021 · The head command in Linux is one of the most important commands you’ll need when viewing text files. If you’re new to Linux, the head command is a perfect place to start, since it has a simple syntax and straight forward purpose. The head command is the complementary command to the tail command.
head(1) — Linux manual page - man7.org
HEAD(1) User Commands HEAD(1) NAME top head - output the first part of files SYNOPSIS top head [OPTION]... [FILE]... DESCRIPTION top Print the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name.
How to Use the head Command on Linux - How-To Geek
Nov 21, 2023 · The Linux head command on its own, for example "head example.txt", will list the first ten lines of a text file or input. You can customize the head command to display a specific number of lines by using the "-n" option, or restrict the output to particular bytes using the " …
head command in Linux with Examples - Online Tutorials Library
head command is a command-line utility, which prints the first 10 lines of the specified files. If more than one file name is provided then data from each file is preceded by its file name. We can change the number of lines the head command prints by using the -n command line option.
head – show first lines of a text file - Unix Tutorial
head command is a great Unix/Linux utility that is super useful when workig with text files. It shows you the top few lines of a specified file, but will also do the same with a redirected output of another Unix/Linux command.
How to Use the Linux head Command {6 Examples} - phoenixNAP
Jan 5, 2022 · The Linux head command prints the first lines of one or more files (or piped data) to standard output. By default, it shows the first 10 lines. However, head provides several arguments you can use to modify the output. Read on to learn how to use the head command, its syntax, and options with easy-to-follow examples.
- Some results have been removed