Linux - Change permission of directories only, Chmod only directories

Change permission of directories only

Find public_home directories and change the directory permission
# find public_html/ -type d -exec chmod 775 {} \; 
The above command will find only directories and change the permission to 755

# find public_html/ -type d -exec chmod 755 {} + 
+ at the end means that many filenames will be passed to every chmod call, thus making it faster. And find own {} makes sure that it will work with spaces and other characters in filenames.

# chmod 755 $(find public_html -type d)
All the above command does only the same function.

The topic on Linux - Change permission of directories only is posted by - Math

Hope you have enjoyed, Linux - Change permission of directories onlyThanks for your time

Tech Bluff