[aklug] Re: chown, chgrp, and chmod

From: Erinn Looney-Triggs <erinn.looneytriggs@gmail.com>
Date: Thu Jun 30 2011 - 19:39:03 AKDT

On 6/30/2011 8:05 PM, Scott A. Johnson wrote:
> I have a directory with thousand of subdirectories and thousands of files in
> each subdirectory. Is there anyway to run chmod/chgrp/chown at the top of
> the file tree and have the changes apply recursively to the files within the
> subdirectories, but not the directory itself?
> For instance:
>
> /Top/Level/Directory/File.txt
>
> I'd like to be in /Top and run "chown -R root" and have the ownership change
> on all the files under /Top (eventually making its way to File.txt), but I
> need the ownership on /Top/Level and /Top/Level/Directory to stay as-is.
>
> Thanks.
>

From /Top:

find . -type f -exec <chmod|chown|chgrp> \{\} \;

-Erinn

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Thu, 30 Jun 2011 20:39:03 -0700

This archive was generated by hypermail 2.1.8 : Thu Jun 30 2011 - 19:39:13 AKDT