Tech Journal Back to Tech Journal

How can I change the permissions of all the subdirectories, but not of the files?

You can use xargs and find to affect only a certain subset of the files in a directory tree. For example, to set the eXecutable bit on all sub-directories from the current, use:

find -type d | xargs chmod ugo+x
Last updated on 2005-08-01 14:00:00 -0700, by Shalom Craimer

Back to Tech Journal