head
FilesBeginner In simulator In real LinuxPrint the first lines of files
Name: head
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
head prints the first part of each file, 10 lines by default. With several files, each gets a ==> name <== header.
It often ends a pipeline to keep just the top results, as in sort ... | head.
Syntax
head [OPTION]... [FILE]...Common options
| -n / --lines [-]NUM | Show the first N lines (default 10); -5 also works |
| -c / --bytes [-]NUM | Show the first N bytes |
| -q / --quiet | With several files, leave out the name headers |
| -v / --verbose | Always show the name headers |