Click to See Complete Forum and Search --> : chmod directories, but not files


JodoKaast
08-10-2001, 01:11 AM
Is there a way to recursively chmod directories only, and not files?

Like if I type "chmod -R 777 *" then it will recursively change all directories AND files, which is not what I want to do.

What I want to do is recursively chmod all files as 666 and all directories as 777.

Is there a way to do this with a single command? I don't want to have to go through every directory and change each one individually....

evulish
08-10-2001, 01:56 AM
My only idea is to make a small perl/shell script to run ls -l | grep ^d and chmod the input...