Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2008 00:03:16 +0100
From:      RW <fbsd06@mlists.homeunix.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: chmod operation on directories / files
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 7 May 2008 07:37:47 -0500
Gordon devel <user0@tkgeomap.org> 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 \;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080508000316.158d6d7c>