Ramblings of an aging IT geek
← Ramblings of an aging IT geek
tooling

i don't reach for grep and find any more

After years of muscle memory, ripgrep and fd quietly replaced grep and find in my daily workflow, and I'm not going back.

A terminal showing a fast ripgrep search across a large repo

I resisted this for ages, out of pure stubbornness. grep and find have been in my fingers for two decades. I can write a find . -type f -name '*.go' -exec grep -n TODO {} + without thinking, and there's a small pride in that. But I've quietly stopped reaching for either, and the reason is just that the replacements are better at the exact thing I do all day.

ripgrep is the one that did it. It searches a tree by default, it's properly fast on a big repository, and crucially it respects .gitignore, so it doesn't bury me in matches from node_modules or vendor or build output. That last bit is the real win. Half my old grep incantations were just elaborate ways of excluding directories I never wanted to see. rg TODO does what I actually meant.

fd is the same story for finding files. fd '\.go$' instead of find . -type f -name '*.go', sensible defaults, ignores the junk, and the output is pleasant to read. It's not that find can't do it. It's that I have to remember find's argument grammar every single time, and fd I just type.

The old tools aren't going anywhere, and I'm glad of that: on a server I've never seen before, grep and find are always there, and they always work. But on my own machines, the muscle memory has rewired itself, and I've stopped feeling guilty about it.