Greg,

chmod will not distinguish between files and directories.
To do the changes you propose, you will want to use find and
chmod together.

I will assume you are at the base of what you want to change.

To  change files:

find . -type f -exec chmod 644 {} \;

To change directories:

find . -type d -exec chmod 755 {} \;

These commands will start a the directory you are in and recusively 
change all files and directories.

If you want to learn more about the -type, read the man page on find.

Mike

On Thu, 2003-06-05 at 19:58, Greg Meyer wrote:
> Can I run chmod so that it only applies the changes to files or only to 
> directories.  I don't see an option in the man page that does this, but I am 
> sure it must be possible.  I want my files to be set to 644 and my 
> directories to 755.
> -- 
> Greg
> 
> 
> ----
> 

> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com
-- 
Michael Noble
mailto: [EMAIL PROTECTED]


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to