Posted By

MikeyLikesIt on 04/06/10


Tagged

Bash ssh permissions


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

mrnicegiaus
beneberle


Recursively chmod directories or files


 / Published in: Bash
 

URL: http://movabletripe.com/archive/recursively-chmod-directories-only/

This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.

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

Similarly, the following will chmod all files only (and ignore the directories):

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

  1. // This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.
  2. find . -type d -exec chmod 755 {} \;
  3.  
  4. // Similarly, the following will chmod all files only (and ignore the directories):
  5. find . -type f -exec chmod 644 {} \;

Report this snippet  

You need to login to post a comment.