The head command
Print the first lines of files. Prints the first 10 lines of each file, or of what is piped into it. With more than one file, each part starts with a ==> name <== header.
A practice shell in your browser that behaves like bash on Linux for these commands. Nothing you type leaves the page.
Usage
head [OPTION]... [FILE]...
Options
| -n N, --lines=N | the first N lines instead of 10 |
|---|---|
| -n -N | everything except the last N lines |
| -N | short for -n N |
Examples
head notes.txtThe first 10 lineshead -n 3 notes.txtThe first 3 linessort scores.txt | head -n 5The five lowest