Find Command – What Does the ‘+’ Do in ‘find /path/ -exec command ‘{}’ +’?

find

What's the + in find /path/ -exec command '{}' + do? as opposed to find /path/ -exec command '{}' \;

Best Answer

The '+' makes one big command line out of all found files to minimize the number of commands to be run.

Given the case that a find command finds four files.

find . -type f -exec command '{}' \;

would produce

command file1
command file2
command file3
command file4 

On the other hand

find . -type f -exec command '{}' \+

produces

command file1 file2 file3 file4
Related Question