Recursive chmod for files or directories only

To do a recursive chmod to directories only you can run:

And for files only:

8 thoughts on “Recursive chmod for files or directories only”

  1. i think there is number of characters limit on single bash command and i guess what “chmod -R 755 dir” does is actually translate it to “chmod 755 dir subdir1 subdir2 … subdirN” so.. if you have a lot of sub directory that you want to chmod’ed it will result a long long single line command.

Leave a Reply

Your email address will not be published. Required fields are marked *