4 ms·
That's pretty neat! I use the following (slower, but short enough that it sticks in my memory so I can do it at a colleague's machine): find . -name "*.jar"
by garblegarble 12y ago
That's pretty neat! I use the following (slower, but short enough that it sticks in my memory so I can do it at a colleague's machine):
find . -name "*.jar" | xargs -tn1 unzip -l | grep SomeClass
- burntsushi 12y ago`xargs` also has a `-P` flag which will instruct it to spread work over multiple processes. Given that you already have `-n1`, adding a `-P 0` will have it automatically spread out over all your CPUs.
- garblegarble 12y agoAwesome, that's good to know!
- ole_tange 12y agoBe aware that xargs does not deal nicely with race conditions: (Parallel grep) http://www.gnu.org/software/parallel/man.html#differences_between_xargs_and_gnu_parallel http://www.gnu.org/software/parallel/man.html#differences_be...