How to execute a command only on directories in Linux recursively

 This command will add group executable permissions only to directories recursively:

sudo find ./ -type d -exec chmod g+x {} + 

Comments