On 06/07/2012 12:35 PM, Joe Zeff wrote:
On 06/07/2012 10:43 AM, Rick Stevens wrote:
As root:
find / -gid 500 -exec chgrp 1000 \{\} \;
find / -uid 500 -exec chown 1000 \{\} \;
At one point, years ago, I knew an option for find that kept it out of
places like /dev and /proc to avoid the spew of error messages. Of
course, since you're doing this as root, it may not matter, but it would
still save you time.
Ok, how about:
find / -not -path "/dev/*" -a -not -path "/proc/*" -a -not -path
"/sys/*" -gid 500 -exec chgrp 1000 \{\} \;
find / -not -path "/dev/*" -a -not -path "/proc/*" -a -not -path
"/sys/*" -uid 500 -exec chown 1000 \{\} \;
Or even (to check for uid 500, gid 500 and change both):
find / -not -path "/dev/*" -a -not -path "/proc/*" -a -not -path
"/sys/*" -uid 500 -a -gid 500 -exec chown 1000:1000 \{\} \;
(each "find" is one line, just in case your mail reader wraps them).
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks@xxxxxxxxxxxxxx -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- "Hello. My PID is Inigo Montoya. You `kill -9'-ed my parent -
- process. Prepare to vi." -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org