From owner-freebsd-questions@FreeBSD.ORG Wed May 7 23:03:20 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 C12571065673 for ; Wed, 7 May 2008 23:03:20 +0000 (UTC) (envelope-from fbsd06+VW=3bb223d1@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by mx1.freebsd.org (Postfix) with ESMTP id 9927C8FC2A for ; Wed, 7 May 2008 23:03:20 +0000 (UTC) (envelope-from fbsd06+VW=3bb223d1@mlists.homeunix.com) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 3AF4723E406 for ; Wed, 7 May 2008 19:03:19 -0400 (EDT) Date: Thu, 8 May 2008 00:03:16 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080508000316.158d6d7c@gumby.homeunix.com.> In-Reply-To: <20080507123747.GA5430@localhost.ok.cox.net> References: <482198FA.8070708@lc-words.com> <20080507123747.GA5430@localhost.ok.cox.net> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: chmod operation on directories / files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 23:03:20 -0000 On Wed, 7 May 2008 07:37:47 -0500 Gordon devel wrote: > On Wed, May 07, 2008 at 01:56:42PM +0200, Zbigniew Szalbot wrote: > > > > 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. > > > How about? > > find . -type d -exec chmod 755 {} \; > find . -type f -exec chmod 644 {} \; > > If there are a lot of them, you might want to pipe to xargs. Or you could "+" instead of \;