Hacker News new | past | comments | ask | show | jobs | submit login

Any reason to use `find -type f |xargs grep -i ...` instead of `grep -i -r "whatever" .`?



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 ...`?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: