Mission 5 of 5
Viewing Larger Files
Turn a deliberately messy folder into a structure another person can understand.
Use pagers and preview tools so big files do not overwhelm your screen.
Mental model
Understand what is happening
less opens a viewer; press q to quit.
head shows the beginning; tail shows the end.
Ctrl+C stops commands that keep running.
Guided lab
Work through the mission
Create a large file
Generates a harmless file for viewing practice.
cd ~/linux-practice
for i in {1..100}; do echo "This is line number $i"; done > large.txtPreview file parts
Shows first lines, last lines, and counts.
head -n 5 large.txt
tail -n 5 large.txt
wc large.txt
wc -l large.txtOpen with less
Press Space for next page, /pattern to search, and q to quit.
less -N large.txtCheckpoint
Verify the mission
The organized folder matches the milestone layout.
Try it yourself
One step without a recipe
Starting only from your home directory, recreate a small workspace, add a 100-line file, inspect its beginning and end, and prove your final location and file count.
Need a hint?
When `less` opens and your screen changes, you haven't broken anything. It's a viewer, not a trap. Press `q` to quit, `/` to search, and Space to page down. If everything truly freezes, try Ctrl+C — that stops most commands that won't listen.
Explain it back
Before you move on
- How do you quit less?
- Which command shows the last 10 lines by default?