I want to change permissions on a tree on Centos 4 to add execute permissions for all directories recursively from a directory. If I use normal chmod, files other than directories are also modified:
chmod -R o+x /my/path/here
How can I only affect directories?
Best Answer
Run
find
on-type d
(directories) with the-exec
primary to perform thechmod
only on folders:To be sure it only performs it on desired objects, you can run just
find /your/path/here -type d
first; it will simply print out the directories it finds.