Index of /andrejciho/Linux/Changing permissions on a directory structure

Name Last modified Comments Description

Back Parent Directory

Changing permissions on a directory structure

If you want to change permissions on all files in a directory structure, but leave the folder permissions untouched, here's how you would go about it.
find . -type f -exec chmod 640 {} \;
Similarly, changing permissions on all folders, but leave the files untouched…
find . -type d -exec chmod 750 {} \;
Or to run anything on the results of find
find . -type f -exec any_script {} \;


Leave a Comment
*Required
*Required (Never published)
 

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image