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

Post Title Posted Description
Back Parent Directory
Changing permissions on a directory structure 2006-06-27 10:32

Mass update permissions on a folder and subfolders


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. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word