find -print0 (was Re: svn commit: trunk/busybox )

Rich Felker dalias at aerifal.cx
Thu May 11 22:39:33 UTC 2006


On Thu, May 11, 2006 at 05:58:34PM -0400, Paul Fox wrote:
>  > IMO the -print0 option exists for administrators wanting to guard
>  > their scripts against exploits involving filenames with embedded
>  > newlines, ...
> 
> and embedded whitespace.  have you never had to process a tree
> full of filenames that were generated on a windows machine or a
> mac?
> 
> i suppose there are alternate solutions, but find's -print0 and
> xargs' -0 handle it trivially.  if you have another technique
> that works well, i'd be interested in learning it.

I've never used xargs because find has a perfectly good -exec argument
that does exactly the same thing...

Rich




More information about the busybox mailing list