[plug] deleting stuff in batches
Russell Steicke
r.steicke at bom.gov.au
Fri Nov 11 13:37:45 WST 2005
On Fri, Nov 11, 2005 at 01:03:40PM +0800, Richard Meyer wrote:
...
> "man find" also says that find . -name '*.wma' -delete
> will work.
>
> Whether that is faster than the xargs way, I don't know, but I suspect
> it gets called once per file, but it may not have the overhead of the
> "exec".
>
> It also says that find . -name "*.wma" -exec rm {} +
> will work.
> from the man page:
What version of find are you using? This is what happens here (debian
sarge):
$ mkdir tmp/foo
$ cd tmp/foo
$ touch a b c
$ find . -type f -delete
find: invalid predicate `-delete'
$ find . -type f -exec echo rm '{}' +
find: missing argument to `-exec'
$ find . -type f -exec echo rm '{}' + \;
rm ./a +
rm ./b +
rm ./c +
$ find --version
GNU find version 4.1.20
$
--
Russell Steicke
-- Fortune says:
"You should, without hesitation, pound your typewriter into a plowshare,
your paper into fertilizer, and enter agriculture"
-- Business Professor, University of Georgia
More information about the plug
mailing list