17 Oct
2006
17 Oct
'06
11:49 p.m.
On Tue, 2006-10-17 at 13:25 -0500, Logan Shaw wrote:
On Tue, 17 Oct 2006, Noel Jones wrote:
On 10/17/06, Geert Hendrickx ghen@telenet.be wrote:
On *BSD you can also use find -X which properly quotes the results.
Nope, find -X skips files with strange characters. find -print0 | xargs -0 is the proper solution. $ man find
find . -type f -name '*whatever*' -exec rm '{}' '+'
Yes, but as already mentioned, this has the bad side effect of fork()ing one rm process per file, which is really inefficient.
It seems to me that if you want to delete files, you should use -delete, otherwise you should use -print0 | xargs -0 (if the command you're running works with multiple arguments), otherwise you should use -exec.
Richard