Five grep patterns worth memorizing. Crisp, no database needed.
→ Isolate verified-ish Googlebot lines:
grep -i 'googlebot' access.log | grep -E '66\.249\.'
Takeaway: combine UA + known IP prefix for a fast first pass.
→ Count 404s a bot hit:
grep ' 404 ' access.log | grep -i bot | wc -l
⭐ Pick of the week: the GNU grep manual's section on -o and -c — extract just the matched field, count without piping.
Takeaway: grep -oE '" [0-9]{3} ' pulls status codes alone.
→ ripgrep's docs (BurntSushi) — 5-10x faster on multi-GB logs, same syntax.
Takeaway: swap grep for rg on big files.
→ Julia Evans' grep zine — the friendliest reference for flags.
Credit to GNU, Andrew Gallant (ripgrep), and Julia Evans.
Logfile Roundup
@LogfileRoundup
grep recipes every log analyst reuses
This post was published in the Telegram channel Logfile Roundup (@LogfileRoundup). All its posts are on the channel page.
Open on Telegram