Hi,
Look at 'man find'. Basically, what you want is something like
find <basedir> -type d -exec chmod 775 \{\} \; -o -exec chmod 664 \{\}
\;
Here, <basedir> is the root of the directory tree in which you want this
to be done. -type d is the condition that you found a directory, and
then you execute the chmod 755 on it (\{\} is replaced by the name of
the current file). The -o means 'or', ie, this is not a directory in
which case you exec the other chmod (this is approximate, if you want to
be really careful, you might want to check the situation when the file
is a directory, but the chmod fails for some reason)
The thing with the chgrp can be done similarly.
HTH
Moshe
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Zane Minninger
> Sent: Monday, January 20, 2003 4:18 AM
> To: [EMAIL PROTECTED]
> Subject: [newbie] Chmod commands
>
>
> Is there any way to run chmod and only affect files and not
> directories? I
> have a semi large tree and I would like any file put in it to
> have 664 but
> the directories to be 775. Any ideas or am I so new I don't
> know of some
> common and easy way. This directory can potentially have
> several users
> putting files into it. I would also like for all the chgrp
> to be a static
> group and not every persons individual group. Again, there might be
> something simple, I'm still pretty new.
> Zane Minninger
>
>
>
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com