Name

head

Synopsis

head [options] [files]

Prints the first few lines of one or more files (default is 10).

Options

-n

Print the first n lines of the file.

-n n

Print the first n lines of the file.

Example

Display the first 20 lines of phone_list:

head -20 phone_list

Get Mac OS X in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.