Re: chmod-ing a directory tree without effecting files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Konrad Kosmowski wrote:

On Wed, 22 Oct 2003 15:50:12 -0700,
Thomas Smith <tom@xxxxxxxxxxxxxxxxxx> wrote:



I need to chmod a directory tree to change the permissions on the directories but not the files they contain.


Is there a way to do this with chmod or another tool?



$ chmod -X


Always read the f* manual first!

man chmod:

#v+
The operator `+' causes the permissions selected to be added to the existing permissions of each file; `-' causes them to be removed; and `=' causes them to be the only permissions that the file has.


The letters `rwx*X*stugo' select the new permissions for the affected users: (...) execute only if the file is a directory or already has
execute permission for some user (*X*) (...)
#v-


Thanks for the input but I did read the man page and the /syntax/ of the command wasn't quite as clear to me as it seems to be to you. Thanks again for the input, though, it'll come in handy.

Thanks to the others who replied, too. Using find worked better in this situation as it allowed me to confirm (-ok) each change.


-- redhat-list mailing list unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux