The reality of log investigation is less about finding and more about discarding and pinpointing. In CLI land:
grep ERROR big.log | grep -v healthcheck | grep -v "known-issue-123" | grep -w timeout
I develop a huge-file viewer (UwView Pro), and I've been bringing exactly these grep ideas into its drill-down search. Every stage now carries four checkboxes — Regex, Ignore case, Whole word (-w), Exclude (-v) — freely combinable, stackable up to 8 stages. Both are in-development features from a pre-release build; more CLI-flavored ones are on the way.
Part 1: the NOT filter (grep -v) — 10,967 → 16
On the OpenStreetMap Japan XML (real data, 892 million lines):
-
Tokyo— 10,967 hits - NOT
医療(medical) — 10,949 - NOT
消防(fire dept.) — 10,928 - include
横浜(Yokohama) — 16 hits
The closest grep expression: grep -C 1 Tokyo | grep -v 医療 | grep -v 消防 | grep -C 1 横浜. Unlike a one-way pipe, every stage persists as a clickable tab with its hit count — jump back anytime; the refinement path doubles as the investigation record.
Part 2: whole-word match (grep -w) — 10,967 → 7
Substring search catches error_count when you wanted error. The new Whole word checkbox is -w:
-
Tokyo— 10,967 hits -
Ariakewith Whole word checked — 7 hits ("Tokyo – Ariake Supercharger," "Tokyo Ariake University"…)
Seven rows out of 892 million, in two stages. Closest CLI: grep -C 1 Tokyo | grep -w Ariake.
The mapping (close, not identical)
| CLI | UwView Pro |
|---|---|
grep -C 1 PATTERN |
an include stage (±1 line of context) |
grep -v |
the Exclude checkbox |
grep -w |
the Whole word checkbox |
grep -i / grep -E
|
Ignore case / Regex |
> hits.txt |
Save… (line numbers, CSV header, ±N context options) |
Close, not identical: drill-down refines ±N-line context blocks while a pipe streams lines, so edge cases differ; -v stages carry no -C (meaningless in grep), and word-boundary definitions differ in fine print. Also new: the screenshots run in the app's English UI.
Honest limits
- Both features are in development — pre-release build, details may change; I'll update at release
- Scripting, automation, cron: still CLI territory. For a one-off search, grep is plenty
- This shines in interactive investigation — when you don't yet know what to discard
- Hit counts are my own runs on one file
UwView Pro is on sale (Windows, macOS, Linux — one license covers all three; 14-day free trial — editing features included). Screenshots and full details:
- NOT filters: https://uvp.y42u.net/en/blog/uvp-grep-v-exclude-drilldown-en/
- Whole-word match: https://uvp.y42u.net/en/blog/uvp-grep-w-whole-word-drilldown-en/
Top comments (0)