head

Displays the beginning of a file

head [options] [file-list]

The head utility displays the beginning (head) of a file. The utility takes its input from one or more files you specify on the command line or from standard input.

Arguments

The file-list contains pathnames of the files that head displays. When you specify more than one file, head displays the filename of each file before displaying the first few lines. When you do not specify a file, head takes its input from standard input.

Options

--bytes [n[u]]

- c Counts by bytes (characters). The n is an optional nonzero integer. The u is an optional unit of measure that can be b (512-byte blocks), k (1,024-byte blocks), or m (1-megabyte blocks). If you include the unit of measure, head ...

Get A Practical Guide to Red Hat® Linux® 8 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.