

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: What Is a Filesystem?
incomplete
2: Filepaths
incomplete
3: Parent Directories
incomplete
4: Absolute vs. Relative Paths
incomplete
5: Files
incomplete
6: Tab Completion
incomplete
7: head and tail
incomplete
8: More and Less
incomplete
9: Touch
incomplete
10: Directories
incomplete
11: Move
incomplete
12: Remove
incomplete
13: Copy
incomplete
14: Home
incomplete
15: Grep
incomplete
16: grep Multiple Files
incomplete
17: Find
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Sometimes you don't want to print everything in a file. Files can be really big after all.
The head command prints the first n lines of a file. The -n flag specifies n as shown:
head -n 10 file1.txt
If you don't specify a number using the -n flag, it will default to 10.
The tail command prints the last n lines of a file. The -n flag specifies n as shown:
tail -n 10 file1.txt
Time to start investigating the bank's transactions.
We print the first 6 lines because the first line in the file is the header, and we want to include that along with the first 5 transactions.
Submit the shell checks.