Index of /Andrej Ciho/Old Blog/Linux/Changing permissions on a directory structure

Back Parent Directory 2006-06-27 10:32

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

This website is powered by WordPress, using the IndexOf theme.