Thursday, May 10, 2012

Apply chmod recursively on directories

suppose you want to chmod all subdirectories of current directory
find . -type d -exec chmod 755 {} \;


Similarly, the following will chmod all files only (and ignore the directories):
find . -type f -exec chmod 644 {} \;

No comments:

Post a Comment