head -n
Show the first N lines of a file
head -n 20 prints the first 20 lines. Without -n it defaults to 10. Useful for checking file format, headers, or the beginning of a log.
Example
$ head -n 5 /var/log/nginx/access.log
192.168.1.1 - - [15/Jan] "GET / HTTP/1.1" 200 612
Tip: Type it yourself in the terminal below - reading is not the same as doing.