Linux & the Command Line / Terminal basics
Lesson 5 of 30
Reading files
cat prints a whole file, less lets you scroll, and head and tail show the start or end. tail -f follows a log as it grows.
Key points
- less: q to quit, / to search
- head -n 20 file
- tail -f follows live logs
cat /etc/os-release
tail -f /var/log/syslogQuiz · +10 XP
Which command follows a log file live?
Log in to save progress and earn XP.