Logfile Roundup
Logfile Roundup
@LogfileRoundup

grep -F vs regex grep: speed you're leaving on the table

A tiny flag that matters on huge logs. Credit to the GNU grep manual.

🔗 Plain regex grep — what everyone types. But grep "Googlebot" still compiles a regex engine even though you want a literal string.
🔗 grep -F (fixed-string) — for literal matches like a UA token or an IP, -F skips regex entirely and runs measurably faster across multi-GB files. Pair with LC_ALL=C to skip Unicode handling for another jump.

⭐ Pick of the week: the one-two from seasoned shell users — LC_ALL=C grep -F "Googlebot" access.log can run several times faster than the naive version on large logs.

Takeaway: regex grep when you genuinely need patterns; grep -F plus LC_ALL=C for literal matches on big files.
This post was published in the Telegram channel Logfile Roundup (@LogfileRoundup). All its posts are on the channel page.
Open on Telegram

Latest posts in “Tools and infrastructure”

All channels in this category →

реклама в сети

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.