Mission 09

Viewing text

Open text, search logs, and inspect output without editing files.

Text and logs
9 minutes Beginner Lesson 9 of 360
catheadtailgrepstat
Lesson 9 of 360 0/360 lessons 0/17 missions Text and logs · 9 minutes
0%
Continue View profile
Ops lab terminal Training lab
New learnerrank 0XP 0%complete
learner@clairos:/home/learner $ Unix ops lab: type a command, press Enter
Instructions 9 minutes

Click any instruction for the command details, the why, and the common mistake to avoid.

Read the readme

Run cat README.txt.

cat README.txt
Tail the auth log

Run tail -n 3 /var/log/auth.log.

tail -n 3 /var/log/auth.log
Search denied logins

Run grep denied /var/log/auth.log.

grep denied /var/log/auth.log
Lesson support

What to notice while you play.

Objective

Read file contents without changing them.

Hint

Use tail for logs and cat for small files.

Why it matters

Most troubleshooting starts by reading evidence.

Common mistakes
  • Opening huge logs with cat in a real terminal.
  • Searching before checking which file you are reading.
Reference

Commands in this lesson.

cat <file>

Print text file contents.

head|tail [-n N] <file>

Read the beginning or end of a file.

grep [-i] <text> <file>

Find literal text inside a file.

stat <path>

Show lab file details.