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 {} \;


the {} is expanded to each file that find finds, and the ; is escaped
with a \ so that the shell passes it on to find. 



-- 
Felix Sheldon <[EMAIL PROTECTED]>

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

Reply via email to