Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2006 16:01:27 +0100
From:      Mathieu CHATEAU <gollum123@free.fr>
To:        Olivier Nicole <on@cs.ait.ac.th>
Cc:        illoai@gmail.com, freebsd-questions@freebsd.org
Subject:   Re[2]: Elegant delete of word ~tmp files in all sub / dirs
Message-ID:  <564274847.20060127160127@free.fr>
In-Reply-To: <200601270200.k0R20orV050840@banyan.cs.ait.ac.th>
References:  <20060126081925.5085916A443@hub.freebsd.org> <000901c622b2$03b3dcc0$0807a8c0@admin> <43D92DD9.1080304@infracaninophile.co.uk> <d7195cff0601261528i37802910n6cff161198d99c5f@mail.gmail.com> <200601270200.k0R20orV050840@banyan.cs.ait.ac.th>

next in thread | previous in thread | raw e-mail | index | archive | help
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> "freebsd-questions-unsubscribe@freebsd.org"





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?564274847.20060127160127>