<b>grep recipes every log analyst reuses</b>
Five grep patterns worth memorizing. Crisp, no database needed.
→ Isolate verified-ish Googlebot lines:
<code>grep -i 'googlebot' access.log | grep -E '66\.249\.'</code>
Takeaway: combine UA + known IP prefix for a fast first pass.
→ Count 404s a bot hit:
<code>grep ' 404 ' access.log | grep -i bot | wc -l</code>
⭐ Pick of the week: the GNU grep manual's section on <code>-o</code> and <code>-c</code> — extract just the matched field, count without piping.
Takeaway: <code>grep -oE '" [0-9]{3} '</code> 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
<b>grep recipes every log analyst reuses</b>
Этот пост опубликован в Telegram-канале Logfile Roundup. Подписаться можно по ссылке: @LogfileRoundup.