[ILUG] Disadvantages of find -exec?
kenn at bluetree.ie
Tue Jan 13 15:10:19 GMT 2009
> > The main one that I can see is that -exec spawns a new process for
> > each file, whereas xargs spawns one process for as many files as the
> > shell can handle (have you ever seen your shell tell you that the
> > command is too long?).
> > Any other drawbacks that people know of?
> isn't that an "apples or oranges"?
> I mean, you suggest that -exec is bad because it spawns a load of
> but xargs could potentially simply not work.
> drawbacks on both sides.
Nope. xargs knows exactly how much your shell can handle and
passes as many args as possible to each run of the command.
More information about the ILUG