(coreutils.info)head invocation


Next: tail invocation Up: Output of parts of files
Enter node , (file) or (file)node

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
`-'.  Synopsis:

     head [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.

   The program accepts the following options.  Also see Note: Common
options.

`-c N'
`--bytes=N'
     Print the first N bytes, instead of initial lines.  Appending `b'
     multiplies N by 512, `k' by 1024, and `m' by 1048576.  However, if
     N starts with a `-', print all but the last N bytes of each file.

`-n N'
`--lines=N'
     Output the first N lines.  However, if N starts with a `-', print
     all but the last N lines of each file.

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

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


   On older systems, `head' supports an obsolete option
`-COUNTOPTIONS', which is recognized only 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').  POSIX 1003.1-2001 (Note: Standards conformance)
does not allow this; use `-c COUNT' or `-n COUNT' instead.

   An exit status of zero indicates success, and a nonzero value
indicates failure.


automatically generated by info2www.cgi version 1.2.2.9