Thanks Erik, Jeff
Erik's solution works but I'm sorry Jeff your's didn't,
unless i've missed something.
I'm using CentOS 4.2
Ben


Erik de Castro Lopo wrote:

Ben Donohue wrote:

Hi Slugs,

I'm still working on this but any quick help i'll welcome.

how do you recursively chmod directories only and not files.

I want to recursively chmod files to 644 and directories to 755.
what is the quickest way?

I thought i'd do the files first and then the dirs as in...
chmod -R 644 * (for files and directories)
chmod ??? for directories only?

For the directories use something like:

  find <top level dir> -type d -exec chmod 755 {} \;

and for the files:

  find <top level dir> -type f -exec chmod 755 {} \;

while you are there, you might want to read the find man page ;
find has lots of interesting features.

Erik

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to