Level 1
0 / 100 XP

Welcome

123456789

grep is the command Linux users reach for more than almost any other. It searches inside files and prints every line that matches a pattern. Need to find every error in a 10,000-line log? grep does it instantly.

You'll practice the core flags:

  • plain grep — print matching lines
  • -i — ignore uppercase/lowercase
  • -n — show line numbers
  • -c — count matches instead of printing them
  • -v — invert: show lines that don't match
  • -r — search a whole folder, recursively

Your files live in projects: an app.log and a notes/ subfolder. Move into projects first.

Restoring lab progress…
Hands On: Searching Inside Files (grep) | Server Academy