Article View: comp.unix.shell
Article #1664Re: a compromise safe way to use find and xargs rm together
From: Dan Bernstein
Date: Mon, 29 Oct 1990 22:13
Date: Mon, 29 Oct 1990 22:13
13 lines
979 bytes
979 bytes
In article <DJM.90Oct27105828@egypt.eng.umd.edu> 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
Technical Details
Message-ID:
<12739:Oct2922:13:1890@kramden.acf.nyu.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!rutgers!cmcl2!kramden.acf.nyu.edu!brnstndReferences:
<DJM.90Oct27105828@egypt.eng.umd.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <DJM.90Oct27105828@egypt.eng.umd.edu> Organization: IR Lines: 13