- No.
- 14
- Date
- Learning goal
- Terminal Start, lesson 5
- Level
- 1 of 3
Command of the day No. 14: head -n
Purpose: Shows only the first lines of a file.
Syntax: head -n number file
Example:
head -n 3 Documents/notes.txt
Buy milk
Call the landlord
Water the plants Output from the simulator, as on a real Linux.
Options:
Try it in the terminal Share image
Fills in the command. Nothing runs until you press Enter.