a compromise safe way to use find and xargs rm together
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Tue Oct 30 09:13:18 AEST 1990
In article <DJM.90Oct27105828 at egypt.eng.umd.edu> djm at eng.umd.edu (David J. MacKenzie) writes:
> Here is another safe way to use find and xargs together, if you don't
> mind making files with newlines in the name immune to removal.
> find / ! -name '*
> *' ! -name '.*
> *' -atime -10 -print | xargs rm -f
No! -name only checks the last component of the path. (A few versions of
find have a -path that would do the trick here, though there are still
all the other metacharacters to worry about, and this feels like quite a
kludge.)
---Dan
More information about the Comp.unix.shell
mailing list