UNIX command to recursively change directory permissions?

I just want to change permissions for directories, not the files contained inside.

+7
unix
source share
4 answers

find . -type d -exec chmod 755 {} +

+10
source share

Assuming you are in the directory you want to start in:

 find . -type d | xargs chmod 755 

or any necessary permissions.

+5
source share
 find . -type d -exec chmod 755 {} \; 
+5
source share

Where do you want to change

 find . -type d | xargs chmod a+x 
+2
source share

All Articles