Comment by andyjpb
4 years ago
`find |grep -i ...` and `find -type f |xargs grep -i ...` have become old favourites.
This seems like an interesting system, provided you don't have more categories than you can easily remember.
If you use it in a team setting, there must not be more categories than the team as a whole can remember which is, perhaps counter-intuitively, fewer than you can probably remember on your own.
As with all classification systems, one should beware the Celestial Emporium of Benevolent Knowledge: https://en.wikipedia.org/wiki/Celestial_Emporium_of_Benevole... or be doomed to repeat it.
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 ...`?