On Thu, 2002-09-19 at 23:53, Oliver Fromme wrote:
> 
> In general, it is a good idea to try to avoid -exec, because
> it is inefficient.  -exec runs the specified command for every
> single file, whilch can be terribly slow if there are a lot of
> files.  Better use xargs instead, which will collect multiple
> filenames and execute the command fewer times.
> 
> This also enables you to use grep to filter the file names in
> a more sophisticated way than find itself can do:
> 
> find foo -type f | grep -i '\.jpg$' | xargs -J % mv % bar
> 

My preferred method also. But ... I can never get that to work if there
are spaces (or other illegal characters) in the file names.

And no, I don't usually put spaces in my filenames, but I use this quite
frequently behind the scenes on Mac OS X.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to