Le 07/05/08 à 14:00, Zbigniew Szalbot téléscripta :
> Hello,

Hi,

> How do I chmod separately files and directories?
>
> If I use chmod -R 644 then it will go through all the subdirectories 
> assigning everything 644 permissions, directories including.
>

Using find(1), you can try something like this:

For files:
  find /plop -type f -exec chmod 644 '{}' \;

For dirs:
  find /plop -type d -exec chmod 755 '{}' \;

> Many thanks!

HTH,
Baptiste

-- 
Baptiste Grenier | PGP: 0x069112E2
HealthGrid SysAdmin
http://healthgrid.org/

Attachment: pgp6YSoa5aV8Z.pgp
Description: PGP signature

Reply via email to