[aklug] Re: chmod

From: Everett Haimes <everett@powernode.net>
Date: Tue Feb 12 2013 - 20:34:45 AKST

Scott,

You could do something like the following:

Find files (type f) and run chmod against the results with xargs:
# find . -type f | xargs chmod 755

And for directories (type d):
# find . -type d | xargs chmod 777

Thanks,
Everett Haimes
www.nodealchemy.com

----- Original Message -----
From: "Scott A. Johnson" <scott.a.johnson@gmail.com>
To: "Aklug" <aklug@aklug.org>
Sent: Tuesday, February 12, 2013 8:27:08 PM
Subject: [aklug] chmod

I have tens of thousands of files nested inside several thousand
directories on a data dump drive. I need to set different chmod levels for
the files inside the directories, but a different chmod for the directories
themselves. Example, the directories need to be 777 while the files are
755. Can I do this easily? Luckily I don't need to set different chmod
levels for different/various files and/or directories. ALL the files
should be 755 - ALL the directories 777. Unfortunatley: "sh# chmod -R 777
/" doesn't work since it will set the directories and files to be the same.

Thanks.

Scott

-- 
Scott A. Johnson
scott.a.johnson@gmail.com
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Tue Feb 12 20:35:00 2013

This archive was generated by hypermail 2.1.8 : Tue Feb 12 2013 - 20:35:00 AKST