← Lessons/Reading the Manual (man pages)
← Reading the Manual (man pages)

Search inside a page

Learn

Searching inside a page

Manuals get long, and scrolling to find one flag is slow. Because man writes to standard output, you can pipe it into grep (from the pipes lesson) and jump straight to the lines you care about:

man tar | grep compress

That keeps only the lines of the tar manual that mention compression. This is the everyday move, whenever you think "what was the flag for…?": man cmd | grep keyword.

Manuals can be long. You want to sort ls output by size but forget the flag — pipe man ls into grep to jump to the lines mentioning size.

sandbox@opspath: ~
OpsPath sandbox · Debian GNU/Linux 12 · GNU bash 5.2
Each command runs in a fresh, isolated sandbox with this lesson's files in ~.
Nothing carries over between commands, so chain with && or | when you need to.
Type a command and press Enter. ↑/↓ history · Ctrl+L clear · Ctrl+C cancel line
# ── Step 2 · Search inside a page ──
# Sign in to run commands — it's free.