3 ms·
interesting trick, but note that many tools ("file" included) can process multiple files at once. So the example could be rewritten using find+xargs as: fi
by theamk 3y ago
interesting trick, but note that many tools ("file" included) can process multiple files at once. So the example could be rewritten using find+xargs as:
find /usr/lib -name "*.so" -print0 | xargs -0 file -N --mime-type | egrep ": text/plain$"
this is much faster (0.5 sec vs 8 sec on my PC), easily parallelizeable if needed, and requires fewer tricks to keep arguments quoted.