[svlug] How do I recursively chmod 0664 files but not directories?

Justin Rocha (Xenith) xenith at xenith.org
Thu Jul 14 17:58:22 PDT 2005

On Thu, Jul 14, 2005 at 12:06:38PM -0700, in the study, with the lead pipe, Daevid Vincent wrote:
> I accidentally typed "chmod -R 0775 /mydir", so now all directories AND
> files are +x
> What magical bash incantation can I type to recursively go through and make
> all files 0664 but make directories 0775?
Try 'chmod -R -x+X /mydir'

+X sets execute on directory-only. (well, pretty much. If you are curious
what it really does, read the man page.)
Justin Rocha  KG6SGU
-Xenith || xenith at xenith.org || http://xenith.org/
JabberID:  xenith at dhbit.ca   || AIM:  JustinR98

Enlightenment -> http://www.enlightenment.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.svlug.org/archives/svlug/attachments/20050714/11c531ba/attachment.bin

More information about the svlug mailing list