On Thu, Jan 05, 2012 at 12:18:56PM +0100, Pascal Stumpf wrote:
> On Thu, 5 Jan 2012 10:24:38 +0000, Stuart Henderson wrote:
> > On 2012/01/02 16:19, Pascal Stumpf wrote:
> > > CVSROOT: /cvs
> > > Module name: src
> > > Changes by: [email protected] 2012/01/02 16:19:45
> > >
> > > Modified files:
> > > usr.bin/find : extern.h find.1 find.c find.h function.c
> > >
> > > Log message:
> > > Add support for "find ... -exec foo {} \+".
> > >
> > > From the manpage:
> > >
> > > If terminated by a plus sign (``+''), the pathnames for which the
> > > primary is evaluated are aggregated into sets, and utility will
> > > be invoked once per set, similar to xargs(1). If any invocation
> > > exits with non-zero exit status, then find will eventually do so
> > > as well, but this does not cause find to exit early. The string
> > > ``{}'' must appear, and must appear last. Each set is limited to
> > > no more than 5,000 pathnames, and is also limited such that the
> > > invocation of utility does not exceed ARG_MAX.
> > >
> > > Code comes from NetBSD, written by John Hawkinson. Tested by eivinde at
> > > terraplane dot org and myself for quite some time.
> > >
> > > ok miod@
> > >
> >
> > This support doesn't extend to -execdir, I think we should add
> > something like this to the manual. OK?
>
> The manual already has only the ; listed for -execdir, so I thought that
> was already clear. Anyway, ok if you think it's necessary, but ask jmc@
> first.
>
actually, i failed to spot that. i had told stuart i was ok with his
diff. but with this new info in mind, i think your proposal (stuart) is
probably not needed. but we could alter the first sentence of execdir to
"Identical to the first form of the -exec primary...".
stuart;s proposal would be more explicit i guess, so i'd be ok with that
too.
jmc
> >
> > Index: find.1
> > ===================================================================
> > RCS file: /cvs/src/usr.bin/find/find.1,v
> > retrieving revision 1.84
> > diff -u -p -r1.84 find.1
> > --- find.1 3 Jan 2012 08:42:00 -0000 1.84
> > +++ find.1 5 Jan 2012 10:17:24 -0000
> > @@ -248,7 +248,9 @@ Identical to the
> > primary with the exception that
> > .Ar utility
> > will be executed from the directory that holds
> > -the current file.
> > +the current file, and that terminating
> > +.Ar utility
> > +with a plus sign is not supported.
> > The filename substituted for the string
> > .Qq {}
> > is not qualified.