head
Output the first part of files
Overview
Prints the first 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name.
Syntax
head [OPTION]... [FILE]...Common Options
-n, --lines=[-]KPrint the first K lines instead of the first 10. With a leading '-' print all but the last K lines of each file.
-c, --bytes=[-]KPrint the first K bytes of each file. With a leading '-' print all but the last K bytes of each file. (K may have a multiplier: b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, etc.)
-q, --quiet, --silentNever print headers giving file names.
-v, --verboseAlways print headers giving file names.
Examples
Displays the first 10 lines of myfile.txt.
Displays the first 5 lines of access.log.
Displays all lines of data.csv except for the last 5 lines.
Displays the first 100 bytes from /dev/urandom.
Lists files and sorts them by modification time (newest first) and shows the newest 3.