unix find command ending with '+' character -
while perusing aws docs noticed following command:
find /var/www -type d -exec sudo chmod 2775 {} +
i'm familiar \; ending exec in find string have never seen '+'. can shed light on this?
here's original page: http://docs.aws.amazon.com/awsec2/latest/userguide/install-lamp.html
thanks!
if use plus (+
) instead of escaped semicolon, arguments grouped before being passed command. example:
$ find . -type f -exec echo {} + . ./bar.txt ./foo.txt
in case, 1 child process (echo . ./bar.txt ./foo.txt
)is created more efficient, because avoids fork/exec each single argument.
using escaped semi-colon, child process created each argument.
$ find . -type f -exec echo {} \; . ./bar.txt ./foo.txt
Comments
Post a Comment