head
Text ProcessingDisplay the first lines of a file
Options & Flags
Available options for this command
-n NUMPrint first NUM lines (default 10)
-c NUMPrint first NUM bytes
Examples
Common usage examples
Display first 10 lines
head file.txtDisplay first 20 lines
head -n 20 file.txtDisplay all except last 5 lines
head -n -5 file.txt