How to use the head command in Linux
head is a program on Unix and Unix-like operating systems used to display the beginning of a text file or piped data.
By default, head will print the first 10 lines of its input to the standard output.
head (GNU coreutils) 8.22
Display a Specific Number of Lines
The syntax for the head command is as follows:
Usage: head [OPTION]... [FILE]... OPTIONS:-c, --bytes=[-]Kprint the first K bytes of each file;with the leading '-', print all but the last K bytes of each file-n, --lines=[-]Kprint the first K lines instead of the first 10; with the leading '-', print all but the last K lines of each file-q, --quiet, --silentnever print headers giving file names-v, --verbosealways print headers giving file names--helpdisplay this help and exit--versionoutput version information and exit
K may have a multiplier suffix:b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.