Markus Blog What's going on Internet?

9Sep/087

Recursive chmod for files or directories only


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

find . -type d -exec chmod 755 {} \;

And for files only:

find . -type f -exec chmod 644 {} \;
Bookmark and Share

Related Article

Comments (7) Trackbacks (1)
  1. wahhh ngomong2 apa tuh mas
    *maap oon nih

  2. ini command di linux untuk ubah permission direktori atau file

  3. alasan 775 dan 644 paan mas, :D maklum newbie
    ga gitu paham, ;)

  4. Sweet! Still not sure why the standard chmod -R doesn’t do this. :(

  5. 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 comment

(required)


*