Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.shell Subject: Re: a compromise safe way to use find and xargs rm together Summary: do not do this Message-ID: <12739:Oct2922:13:1890@kramden.acf.nyu.edu> Date: 29 Oct 90 22:13:18 GMT References: Organization: IR Lines: 13 In article djm@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