head

NAME

head - display first num lines or bytes of a file

SYNOPSIS

head [-b num] [-c num] [-k num] [-n num] [file...]

DESCRIPTION

This filter displays the first num lines of each of the specified files, or of the standard input if no files are specified.

If more than one option (-b, -c, -k, or -n) is specified, the head(1) command ignores all options except the last one. If no option is specified, the head(1) command uses the default option -n 10.

If more than a single file is specified, each file is preceded by a header consisting of the string "==> XXX <==" where XXX is the name of the file.

OPTIONS

-b num
Print out first num blocks (512 bytes).
-c num
Print out first num bytes.
-k num
Print out first num kilobytes (1024 bytes).
-n num
Print the first num lines of each input file. The num option must be a positive integer. If num is omitted, it defaults to 10.

DIAGNOSTICS

The head(1) utility exits 0 on success, and >0 if an error occurs.

SEE ALSO

tail(1)