I'm on linux, and I have a directory with numerous sub-directories and items inside them. I want to run a recursive chmod on all directories and sub-directories but NONE of the files inside those directories.
chmod -R 777 {folder}
Is there a flag I can add to the chmod command to make the chmod only apply to sub-directories?
Off the top of my head:
find {folder} -type d -print0 | xargs -0 chmod 777
find {folder} -type d -print0 | xargs -0 chmod 777
Try:
find {folder} -type d -exec chmod 777 {} \;
Straight from the man pages:
And also corroborated here: https://stackoverflow.com/a/17091831/538512
use the following format or a derivative thereof chmod -R u=rwX,go=rwX {folder}
Hope that helps!