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

Derek J. Balling dredd at megacity.org
Thu Jul 14 12:12:19 PDT 2005


On Jul 14, 2005, at 03:06 PM, 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?

$ man find

possibly also, if you don't like the --exec syntax

$ man xargs

Cheers,
D


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2365 bytes
Desc: not available
Url : http://lists.svlug.org/archives/svlug/attachments/20050714/04cb74b0/smime.bin


More information about the svlug mailing list