Thread View: comp.unix.shell
2 messages
2 total messages
Started by David J. MacKenzie
Sat, 27 Oct 1990 14:58
a compromise safe way to use find and xargs rm together
Author: David J. MacKenzie
Date: Sat, 27 Oct 1990 14:58
Date: Sat, 27 Oct 1990 14:58
8 lines
641 bytes
641 bytes
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 -- David J. MacKenzie <djm@eng.umd.edu> <djm@ai.mit.edu>
Re: a compromise safe way to use find and xargs rm together
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads