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

Tagged as: Leave a comment
Comments (7) Trackbacks (1)
  1. wow.. new tutorial.. thanx

  2. wahhh ngomong2 apa tuh mas
    *maap oon nih

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

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

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

  6. 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


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word