LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Changing flags only for directoires (https://www.linuxquestions.org/questions/linux-general-1/changing-flags-only-for-directoires-103714/)

ivanatora 10-14-2003 03:40 AM

Changing flags only for directoires
 
I want to chmod all direcotries on one dir, but not files. How can be done that?
I copy tar.gzs from my FAT32 partition. Thy are all chmodded to 777. I want to remove the 'x' flag, but when I do $ chmod a-x * it changes the directories flags too.. that makes them unbrowsable.

hw-tph 10-14-2003 04:10 AM

Do something like chmod a-x *.tgz if you want all tgz files for be stripped of the exec bit.

hw

ivanatora 10-14-2003 04:49 AM

What about if I had different situation? I want to understand the way to chmod only directories :)

yapp 10-14-2003 05:28 AM

Code:

find . -type d -exec chmod +x {} \;
, or "find . type d | xargs chmod +d" if I'm not mistaken.


All times are GMT -5. The time now is 10:25 PM.