5 ms·
Pointless nitpick: replace rm `find lisp -name '*.elc'` with find lisp -name '*.elc' -exec rm {} \;
by f00zz 6y ago
Pointless nitpick: replace
rm `find lisp -name '*.elc'`
with
find lisp -name '*.elc' -exec rm {} \;
- cestith 6y agoSo long as we're nitpicking... The version you're replacing is two processes. It may, with enough files, give an error about a command line length limit. However, it's one find and one rm. Your version spawns rm for every file found, basically like using xargs. If you want the best of both worlds, try: find lisp -name '*.elc' -delete
- f00zz 6y agoThanks, TIL! I really should read the `find` man page more carefully one of these days. (The original version will also fail to remove files with names containing spaces.)
- cestith 6y agoThat's true. Getting shell escapes right for various shells is not a fun thing to do, either. I think the ship has sailed on convincing people not to use spaces in file names, so that's always good to check.