On Fri, Nov 18, 2011 at 11:38 AM, Rich Shepard <[email protected]>wrote:
> I inadvertently changed permissions on all directories and files in my ~/
> to 755 (including the dot files, of course). Only the directories should
> have those perms; regular files should be 644.
>
> I want to correct this as quickly as possible, but I cannot find an
> option
> in the chmod man page that will ignore directories while changing all other
> files. There's probably a scripting approach using file and exec, but I've
> not done anything like this before so guidance on how to restore the
> appropriate perms will be very helpful.
>
> Rich
>
>
I would do this with find as you suggested. Find does have an option to
only search for files. Here's my first guess:
find -type f -exec chmod 644 {} \;
maybe run this in a small directory with a few files before turning it
loose on your whole home dir.
-wes
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug