>How do you set all directories and subdirectories in a given directory to
>775.
>For example I want to do a ‘chmod -R 775 *’ but I want it to effect
>directories only.
>I would also like to do ‘chmod -R 664 *’ but only affect files, not
>directories.
chmod -R a+rX,g+w directory_name will do both.
X says– change to x permission only if it already has x permission for
owner, not otherwise.