head¶
Output the first part of files.
Synopsis¶
Description¶
Print the first N lines of each FILE to standard output. If no files are specified, read from standard input. With more than one FILE, precede each with a header giving the file name.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--lines |
-n |
Output the first N lines | 10 |
--quiet |
-q |
Never output headers giving file names | false |
--verbose |
-v |
Always output headers giving file names | false |
Examples¶
Show first 10 lines of a file:
Show first 20 lines:
Show first lines of multiple files:
Suppress file headers:
Read from stdin:
Sample Output¶
With multiple files: