[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.1 head: Output the first part of files

head prints the first part (10 lines by default) of each file; it reads from standard input if no files are given or when given a file of `-'. Synopses:

 
head [option]... [file]...
head -number [option]... [file]...

If more than one file is specified, head prints a one-line header consisting of
 
==> file name <==
before the output for each file.

head accepts two option formats: the new one, in which numbers are arguments to the options (`-q -n 1'), and the old one, in which the number precedes any option letters (`-1q').

The program accepts the following options. Also see 2. Common options.

`-countoptions'
This option is only recognized if it is specified first. count is a decimal number optionally followed by a size letter (`b', `k', `m') as in -c, or `l' to mean count by lines, or other option letters (`cqv').

`-c bytes'
`--bytes=bytes'
Print the first bytes bytes, instead of initial lines. Appending `b' multiplies bytes by 512, `k' by 1024, and `m' by 1048576.

`-n n'
`--lines=n'
Output the first n lines.

`-q'
`--quiet'
`--silent'
Never print file name headers.

`-v'
`--verbose'
Always print file name headers.



This document was generated by Paul Visscher on December, 28 2000 using texi2html