From owner-freebsd-questions@FreeBSD.ORG Wed May 7 12:36:51 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 084A7106567E for ; Wed, 7 May 2008 12:36:51 +0000 (UTC) (envelope-from user0@tkgeomap.org) Received: from eastrmmtao106.cox.net (eastrmmtao106.cox.net [68.230.240.48]) by mx1.freebsd.org (Postfix) with ESMTP id 85CB78FC17 for ; Wed, 7 May 2008 12:36:50 +0000 (UTC) (envelope-from user0@tkgeomap.org) Received: from eastrmimpo02.cox.net ([68.1.16.120]) by eastrmmtao106.cox.net (InterMail vM.7.08.02.01 201-2186-121-102-20070209) with ESMTP id <20080507123649.LNNF15722.eastrmmtao106.cox.net@eastrmimpo02.cox.net>; Wed, 7 May 2008 08:36:49 -0400 Received: from localhost.my.domain ([68.97.41.207]) by eastrmimpo02.cox.net with bizsmtp id Ncco1Z00R4UAjD802ccotx; Wed, 07 May 2008 08:36:49 -0400 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.2/8.14.2) with ESMTP id m47Cbm0Q005479; Wed, 7 May 2008 07:37:48 -0500 (CDT) (envelope-from user0@tkgeomap.org) Received: (from tkgeomap@localhost) by localhost.my.domain (8.14.2/8.14.2/Submit) id m47CblO7005478; Wed, 7 May 2008 07:37:47 -0500 (CDT) (envelope-from user0@tkgeomap.org) X-Authentication-Warning: localhost.my.domain: tkgeomap set sender to user0@tkgeomap.org using -f Date: Wed, 7 May 2008 07:37:47 -0500 From: Gordon devel To: Zbigniew Szalbot Message-ID: <20080507123747.GA5430@localhost.ok.cox.net> References: <482198FA.8070708@lc-words.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <482198FA.8070708@lc-words.com> User-Agent: Mutt/1.4.2.3i 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 12:36:51 -0000 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. Cheers, Gordon