'rm' Can not delete files
Randal L. Schwartz
merlyn at stonehenge.com
Fri Feb 10 18:29:56 UTC 2012
>>>>> "Matthew" == Matthew Seaman <m.seaman at infracaninophile.co.uk> writes:
Matthew> find . -type f -depth 1 -exec rm -f '{}' ';'
Matthew> but let's not leave people in any doubt that this is not the
Matthew> best option.
However...
find . -type f -depth 1 -exec rm -f {} +
Might very well be a great option. Well, not for something that is also
like -delete, but for other things that would have formerly required
"-print0 | xargs -0"... this is apparently a fairly recent (and
welcome!) modification to find.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
More information about the freebsd-questions
mailing list