Recursively chmod directories only


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Recursively chmod directories only
  2.  
  3. find . -type d -exec chmod 755 {} \;
  4.  
  5. This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.
  6.  
  7. Similarly, the following will chmod all files only (and ignore the directories):
  8.  
  9. find . -type f -exec chmod 644 {} \;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.