As
MadeInGermany informs us that the
-delete is available in newer versions, then that will probably run better than
-exec rm {} \; as the latter will spawn a new process for each file, and that in itself will take a small amount of time. Multiply by perhaps 100,000 hits suddenly becomes a lot of time spent just creating a new process for each delete.
To my embarrassment, most of my servers are rather behind the times (AIX 4.3.3 for some) so I've only got this flag in RHEL 6.3.
Interestingly in the RHEL
man page, I found this:-
Quote:
NON-BUGS
$ find . -name *.c -print
find: paths must precede expression
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] {path...] [expression]
This happens because *.c has been expanded by the shell resulting in
find actually receiving a command line like this:
find . -name bigram.c code.c frcode.c locate.c -print
That command is of course not going to work. Instead of doing things
this way, you should enclose the pattern in quotes or escape the wild-
card:
$ find . -name '*.c' -print
$ find . -name \*.c -print
Perhaps a neater way (with examples) of what I was trying to say earlier.
Glad that we could collectively help, and I've learned something too
Robin