find -print0 (was Re: svn commit: trunk/busybox )
ldoolitt at recycle.lbl.gov
ldoolitt at recycle.lbl.gov
Thu May 11 15:45:16 PDT 2006
Rich -
On Thu, May 11, 2006 at 06:39:33PM -0400, Rich Felker wrote:
> On Thu, May 11, 2006 at 05:58:34PM -0400, Paul Fox wrote:
> > [chop] 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...
"exactly" is not a good word to use there. There are differences,
both in usage and performance. -print0 | xargs -0 is better suited
to grep, for instance, that has a relatively heavy startup cost
per process.
- Larry
More information about the busybox
mailing list