Hacker News new | ask | show | jobs
by merlinscholz 2007 days ago
Any reason to use `find -type f |xargs grep -i ...` instead of `grep -i -r "whatever" .`?
2 comments

I usually put a few paths in between "find" and "-type", use the other predicates of "find" and often rewrite if from a just executed `find ... | grep`.

One particular modification is to extend the pipeline between the "find" and the "xargs" to filter the file list, especially `grep -v .git` ;-)

Couldn't you use `rg` (ripgrep) instead `find -type f |xargs grep -i ...`?