Mission 48

Case-insensitive search

Find text regardless of capitalization.

Text and logs
7 minutes Core Lesson 48 of 360
grepwc
Lesson 48 of 360 0/360 lessons 0/17 missions Text and logs · 7 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 7 minutes

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

Search failed

Run grep -i failed /var/log/auth.log.

grep -i failed /var/log/auth.log
Search root

Run grep root /var/log/auth.log.

grep root /var/log/auth.log
Count auth log

Run wc -l /var/log/auth.log.

wc -l /var/log/auth.log
Lesson support

What to notice while you play.

Objective

Use grep -i and counts to review log text.

Hint

Search for failed with -i.

Why it matters

Log sources do not always use consistent casing.

Common mistakes
  • Missing matches because case differs.
  • Counting lines before filtering.
Reference

Commands in this lesson.

grep [-i] <text> <file>

Find literal text inside a file.

wc [-l] <file>

Count lines, words, and characters.