View previous topic :: View next topic |
Author |
Message |
freebies_11 n00b
Joined: 09 Dec 2004 Posts: 36
|
Posted: Mon Jan 14, 2008 6:52 pm Post subject: chmod'ing all files and directories? |
|
|
Hi,
How would I go about chmod'ing all files 600 and all directories 700 recursively?
Thanks! |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Mon Jan 14, 2008 6:54 pm Post subject: |
|
|
chmod 0700 * -R _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
freebies_11 n00b
Joined: 09 Dec 2004 Posts: 36
|
Posted: Mon Jan 14, 2008 6:55 pm Post subject: |
|
|
Thanks for the quick reply but this won't work since it'll chmod files 700 instead of 600. |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Mon Jan 14, 2008 7:02 pm Post subject: |
|
|
Use mc.
It's in portage.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
frenkel Veteran
Joined: 13 May 2003 Posts: 1034 Location: .nl
|
Posted: Mon Jan 14, 2008 7:21 pm Post subject: |
|
|
Use find, something like this:
$ find -type f -exec chmod 600 '{}' \;
$ find -type d -exec chmod 700 '{}' \; |
|
Back to top |
|
|
freebies_11 n00b
Joined: 09 Dec 2004 Posts: 36
|
Posted: Mon Jan 14, 2008 7:32 pm Post subject: |
|
|
Thank you everyone for your replies, the find method worked perfectly. |
|
Back to top |
|
|
|