From owner-freebsd-questions@FreeBSD.ORG Wed May 7 12:32:34 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95E911065673 for ; Wed, 7 May 2008 12:32:34 +0000 (UTC) (envelope-from baptiste.grenier@healthgrid.org) Received: from r12149.ovh.net (rps1895.ovh.net [91.121.199.195]) by mx1.freebsd.org (Postfix) with ESMTP id 556C98FC15 for ; Wed, 7 May 2008 12:32:34 +0000 (UTC) (envelope-from baptiste.grenier@healthgrid.org) Received: from localhost (unknown [193.48.91.205]) by r12149.ovh.net (Postfix) with ESMTP id F1C4935DAB; Wed, 7 May 2008 14:11:43 +0200 (CEST) Date: Wed, 7 May 2008 14:09:45 +0200 From: Baptiste Grenier To: Zbigniew Szalbot Message-ID: <20080507120944.GA4405@healthgrid.org> References: <482198FA.8070708@lc-words.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <482198FA.8070708@lc-words.com> Organization: HealthGrid.org User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-questions@freebsd.org Subject: Re: chmod operation on directories / files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Baptiste Grenier List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 12:32:34 -0000 --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--