Name
head — stdin stdout - file -- opt --help --version
Synopsis
head [options] [files]
The head command prints the
first 10 lines of a file: great for previewing the
contents.
$ head myfile
$ head * | less Preview all files in the current directoryIt’s also good for previewing the first few lines of output from a pipeline:
$ grep 'E' very-big-file | head
Useful options
|
- |
Print the first
|
|
|
Print the first
|
|
|
Print the first
|
|
|
Quiet mode: when
processing more than one file, don’t print a banner above
each file. Normally, |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access