From Electron Cloud
Line 4: | Line 4: | ||
</pre> | </pre> | ||
-print0 and -0 are to [http://www.linuxdevcenter.com/pub/a/linux/lpt/09_22.html deal with spaces in the filenames]. | -print0 and -0 are to [http://www.linuxdevcenter.com/pub/a/linux/lpt/09_22.html deal with spaces in the filenames]. | ||
+ | |||
+ | |||
+ | For read/write but NOT execute on normal files: | ||
+ | <pre> | ||
+ | find . -type f -print0 | xargs -0 chmod 0660 | ||
+ | </pre> |
Revision as of 12:00, 18 October 2005
To change every directory to have ug+rwx and sticky:
find . -type d -print0 | xargs -0 chmod 1770
-print0 and -0 are to deal with spaces in the filenames.
For read/write but NOT execute on normal files:
find . -type f -print0 | xargs -0 chmod 0660