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

Olivier Nicole on at cs.ait.ac.th
Thu Jan 26 18:01:02 PST 2006


> > > 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


More information about the freebsd-questions mailing list