On Mon, 14 Apr 2008 16:39:23 -0700
Bill Campbell <[EMAIL PROTECTED]> wrote:

> On Mon, Apr 14, 2008, Simon Gao wrote:
> >Hi,
> >
> >I need to work on some files and directories that have spaces in
> >them like:
> >
> >interesting story\2008 March\{story one,story two}.
> >
> >When using find with -exec, part of the file/directory name will be 
> >missing and therefore lead to error.
> 
> Generally it's better to use find and xargs when processing
> arbitrary lists of files.  It can be significantly more efficient
> than ``exec'ing'' a command for each file when the command can
> process multiple arguments, and they previde for file names with
> strange characters using the -print0 option to find, and -0
> option to xargs as in:

find has neither of the limitations you mention. It does the equivalent
of "-print0 | xargs -0" automatically, and can handle multiple arguments
with "{} +". It also has -execdir which can be convenient.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to