Lazo Lab Sign up

Linux & the Command Line / Power tools

Lesson 15 of 30

grep

grep searches text for a pattern. It's how you find one line in a huge log.

Key points

  • grep -i ignores case
  • grep -r searches folders
  • grep -c counts matches
grep -i "failed password" /var/log/auth.log
Watch a video on thisOpens YouTube search results for “grep” in a new tab

Quiz · +10 XP

Which command searches files for text?

Log in to save progress and earn XP.