On Sunday, April 17, 2016 22:46:22 Bernhard Voelker wrote: > On 04/13/2016 03:07 PM, Kamil Dudka wrote: > > * find(-exec): Explain how exit status is propagated if the > > -exec command {} + syntax is used. > > > > Reported at https://bugzilla.redhat.com/1325049 > > Thanks for the report and the patch. > I thought this was already documented somewhere, but obviously not > in the man page (probably in the Texinfo manual). > > > --- > > > > find/find.1 | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/find/find.1 b/find/find.1 > > index c948b4b..2c228f8 100644 > > --- a/find/find.1 > > +++ b/find/find.1 > > @@ -1066,22 +1066,25 @@ option instead. > > > > .IP "\-exec \fIcommand\fR {} +" > > This variant of the > > .B \-exec > > action runs the specified command on the > > selected files, but the command line is built by appending each > > selected file name at the end; the total number of invocations of the > > command will be much less than the number of matched files. The > > command line is built in much the same way that > > .B xargs > > builds its command lines. Only one instance of `{}' is allowed within > > the command. The command is executed in the starting directory. If > > > > +any invocation returns a non-zero value as exit status, the > > s/the$/then/
Not a typo, the$ was intended but ... both wordings sound fine to me :-) > > +.B find > > +utility returns a non-zero exit status. If > > > > .B find > > encounters an error, this can sometimes cause an > > immediate exit, so some pending commands may not be run > > at all. This variant of > > .B \-exec > > always returns true. > > > > .IP "\-execdir \fIcommand\fR ;" > > .IP "\-execdir \fIcommand\fR {} +" > > Like > > .BR \-exec , > > The same applies to -execdir (which should be preferred anyway). > I've added that in the attached, and adjusted the commit message > to GNU standards. I'll push that in your name soon. Looks good to me. Thank you for polishing the patch! Kamil > Thanks & have a nice day, > Berny