As chaves serão substituídas pelos resultados do comando find
, e o chmod
será executado em cada um deles. O +
faz com que find
tente executar o mínimo de comandos possível (assim, chmod 775 file1 file2 file3
em oposição a chmod 755 file1
, chmod 755 file2
, chmod 755 file3
). Sem eles, o comando apenas dá um erro. Isso tudo é explicado em man find
:
-exec command ;
Execute command; true if 0 status is returned. All following
arguments to find are taken to be arguments to the command until
an argument consisting of ';' is encountered. The string '{}'
is replaced by the current file name being processed everywhere
it occurs in the arguments to the command, not just in arguments
where it is alone, as in some versions of find.
-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.