Re: Elegant delete of word ~tmp files in all sub / dirs
Hi Mathieu, useless to do -r while you search only files (-type f) the delete function of find seems more apropriate to me But the -exec mode is more general (understand you put whatever command you want there) and beside, the first question was refeering to a syntax using {}. But I guess that Graham has already deleted all his directories anyway :) Olivier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Elegant delete of word ~tmp files in all sub / dirs
+++ Matthew Seaman [freebsd] [26-01-06 20:15 +]: | Graham Bentley wrote: | Hi All, | | I once found a very elegant method of recursively | removing all the word ~tmp files on our Samba | server (many hundereds of subs) | | It involved find rm xargs and some {} | | It worked very quickly indeed. I have tried to | find this again but cant and have used alternatives | that are alot slower. | | Any CLI Gurus point me in the path of enlightenment ? | |find /your/file-system -type f -name '*~tmp*' -print0 | xargs -0 rm -f | | or something like that. You may also try: find /your/file-system -type f -name '*~tmp*' -delete -- pgplJHuroOSnx.pgp Description: PGP signature
Re[2]: Elegant delete of word ~tmp files in all sub / dirs
Hello Olivier, useless to do -r while you search only files (-type f) the delete function of find seems more apropriate to me Mathieu CHATEAU Friday, January 27, 2006, 3:00:50 AM, you wrote: removing all the word ~tmp files on our Samba server find /your/file-system -type f -name '*~tmp*' -print0 | xargs -0 rm -f or something like that. find /your/file-system -type f -name '*~tmp*' -delete ON Or, Graham wanted something with {} ON find /your/file-system -type f -name '*~tmp*' -exec /bin/rm -rf {} \; ON Olivier ON ___ ON freebsd-questions@freebsd.org mailing list ON http://lists.freebsd.org/mailman/listinfo/freebsd-questions ON To unsubscribe, send any mail to ON [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Elegant delete of word ~tmp files in all sub / dirs
Hi All, I once found a very elegant method of recursively removing all the word ~tmp files on our Samba server (many hundereds of subs) It involved find rm xargs and some {} It worked very quickly indeed. I have tried to find this again but cant and have used alternatives that are alot slower. Any CLI Gurus point me in the path of enlightenment ? :o) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Elegant delete of word ~tmp files in all sub / dirs
Graham Bentley wrote: Hi All, I once found a very elegant method of recursively removing all the word ~tmp files on our Samba server (many hundereds of subs) It involved find rm xargs and some {} It worked very quickly indeed. I have tried to find this again but cant and have used alternatives that are alot slower. Any CLI Gurus point me in the path of enlightenment ? find /your/file-system -type f -name '*~tmp*' -print0 | xargs -0 rm -f or something like that. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Elegant delete of word ~tmp files in all sub / dirs
On 1/26/06, Matthew Seaman [EMAIL PROTECTED] wrote: Graham Bentley wrote: removing all the word ~tmp files on our Samba server find /your/file-system -type f -name '*~tmp*' -print0 | xargs -0 rm -f or something like that. find /your/file-system -type f -name '*~tmp*' -delete I would think. -- -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Elegant delete of word ~tmp files in all sub / dirs
removing all the word ~tmp files on our Samba server find /your/file-system -type f -name '*~tmp*' -print0 | xargs -0 rm -f or something like that. find /your/file-system -type f -name '*~tmp*' -delete Or, Graham wanted something with {} find /your/file-system -type f -name '*~tmp*' -exec /bin/rm -rf {} \; Olivier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]