chmod operation on directories / files
Baptiste Grenier
baptiste.grenier at healthgrid.org
Wed May 7 12:32:34 UTC 2008
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080507/4f39109a/attachment.pgp
More information about the freebsd-questions
mailing list