Choose your dojo

Master every interface, one skill at a time

Filter Command Output with grep

What This Does

Show only lines from command output that contain a specific word or pattern, hiding everything else.

Why It's Useful

Find what matters, ignore the rest. When command output is long, grep shows only the lines you care about.

How to Do It

  1. Pipe command output to grep followed by your search term
  2. For example: ls -la | grep Documents shows only files with "Documents" in the name
  3. Or: ps aux | grep python shows only processes containing "python"

Try This Now

Run ls ~ | grep Doc to see only files and folders in your home directory that contain "Doc" in their names.

Mental Hook: Find what matters, ignore the rest.