Linux Terminal Glossary
›
File Viewing & Editing
head -n 20 file.txt
Category:
File Viewing & Editing
head -n 20 file.txt
Copy command
Print the first 20 lines of a file
Prints the first 20 lines of a file. Change the number to print however many lines you need.
Looking for more?
Search all 7,657 commands
— works offline, in English or Spanish, and fixes typos.