Date: Wed, 7 May 2008 14:09:45 +0200 From: Baptiste Grenier <baptiste.grenier@healthgrid.org> To: Zbigniew Szalbot <z.szalbot@lc-words.com> Cc: freebsd-questions@freebsd.org Subject: Re: chmod operation on directories / files Message-ID: <20080507120944.GA4405@healthgrid.org> In-Reply-To: <482198FA.8070708@lc-words.com> References: <482198FA.8070708@lc-words.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Le 07/05/08 =E0 14:00, Zbigniew Szalbot t=E9l=E9scripta :
> Hello,
Hi,
> How do I chmod separately files and directories?
>
> If I use chmod -R 644 then it will go through all the subdirectories=20
> 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
--=20
Baptiste Grenier | PGP: 0x069112E2
HealthGrid SysAdmin
http://healthgrid.org/
--2oS5YaxWCcQjTEyO
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkghnAMACgkQLLKEaQaREuKgngCgt9davDnWxoelHSNQUy3iQHw3
CJ0An2hv1ltugeAqO4fP/vycTZhN14aU
=AA4s
-----END PGP SIGNATURE-----
--2oS5YaxWCcQjTEyO--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080507120944.GA4405>
