Return to Snippet

Revision: 25706
at April 6, 2010 12:07 by MikeyLikesIt


Initial Code
// 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 {} \;

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

Initial Description
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 {} \;

Initial Title
Recursively chmod directories or files

Initial Tags
Bash, ssh

Initial Language
Bash