4 ms·
I like the composition of tools, it lets you extend your usage pretty easily. I personally run this 20 times a day: find -name '*.java' | xargs grep 'pattern'
by kjeetgill 8y ago
I like the composition of tools, it lets you extend your usage pretty easily. I personally run this 20 times a day: find -name '*.java' | xargs grep 'pattern'
- laumars 8y agoBut at least there you're searching for specific files. I was talking only about running a find to launch an instance of grep for every file found. That's more keystrokes to get a slower result. For what it's worth, my biggest usage of find is similar to your java example (except a different file extension). I also do do '-exec sed...') a lot too.
- zokier 8y agoif you are piping to xargs, for love of god at least use -print0
- meowface 8y agoWith ag: ag -G java pattern