find -print0 (was Re: svn commit: trunk/busybox )
Paul Fox
pgf at brightstareng.com
Thu May 11 22:50:47 UTC 2006
> > > 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.
exactly. the performance hit of running a new process for every
filename rather than one per MAXARGS filenames is huge, in my
experience.
paul
=---------------------
paul fox, pgf at brightstareng.com
More information about the busybox
mailing list