On Wed, Jul 30, 2003 at 09:51:07PM +1000, Felix Sheldon wrote:
> On Thu, 2003-07-31 at 07:34, Voytek Eymont wrote:
> > I'm trying to chmod all (web) files to 0644 and dirs to 0755;
> > is there a wy to differentiate files from dirs ?
> > 
> > at the moment, I end up with both files and dirs getting set same, forcing me to 
> > then
> > 'correct' dirs to 0755
> > 
> 
> find -type f -exec chmod 644 {} \;
> 
> find -type d -exec chmod 755 {} \;

Or the faster way:

find -type f | xargs chmod 0644
find -type d | xargs chmod 0755

Only two executions of chmod, instead of lots.

- Matt
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to