Elegant delete of word ~tmp files in all sub / dirs

Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Jan 26 12:15:32 PST 2006

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.



Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20060126/70880c3a/signature.bin

More information about the freebsd-questions mailing list