For the command structure -exec command {} \;
,i got info in man find
.
- {} means
selected files
. - ; means trminate the argument.
- \; escaped to protect them from expansion by the shell.
In the paragraph related to -exec command {} +
.
-exec command {} +
This variant of the -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 invoca‐
tions of the command will be much less than the number of
matched files. The command line is built in much the same way
that xargs builds its command lines. Only one instance of `{}'
is allowed within the command, and (when find is being invoked
from a shell) it should be quoted (for example, '{}') to protect
it from interpretation by shells. The command is executed in
the starting directory. If any invocation returns a non-zero
value as exit status, then find returns a non-zero exit status.
If find encounters an error, this can sometimes cause an immedi‐
ate exit, so some pending commands may not be run at all. This
variant of -exec always returns true.
It never say something on +
,What does + mean in the bash -exec command {} +
?
It means to terminate the argument such as ;
?
+
means plus such as 3+5=8
or concatenate
, to join two strings into one such as s1
+s2
.
It is a strange thing to assign a meaning terminate the argument
for +
.