set numerous files and directories to 664 and 775

This is actually a Solaris 9 question:I need to set numerous files/directories under a selected "branch" (directory) to 664 (files) and 775 (directories), recursively.also need to ensure all files/directories created from then on are 664/775, respectively.Thanks
[297 byte] By [SummerWine] at [2007-11-26 0:47:18]
# 1
Try "chmod -R mode dir_path".Also, "man chmod" for more info.HTH,Roger S.
Jo_nage at 2007-7-5 19:42:21 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

I guess I wasn't clear...

The directory/file structure consists of multiple levels (subdirectories) and files in each of those subdirectories.

I can do a

chmod -R 775 whatever

this changes ALL files AND directories under directory: whateverto 755

I need to change all subdirectories to 775 and all files (non-directories) within those subdirectories to 664

Is there a way to indicate file or directory.. There does not appear to be an option using chmod..

Thanks

SummerWine at 2007-7-5 19:42:21 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3
How about ...cd /directory/basefind . -type d -exec chmod 775 {} \;find . -type f -exec chmod 664 {} \;
SimonJM at 2007-7-5 19:42:21 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 4
Thanks...
SummerWine at 2007-7-5 19:42:21 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 5
You should be able to use find(1)something like:find . -type d -exec chmod 755 {} ';'will change directories under the current wd to 755using -type p will find plain filesman find for more information
dennisduncan at 2007-7-5 19:42:21 > top of Java-index,Solaris Operating System,Solaris 10 Features...