On 12/15/17 11:55, Galen Seitz wrote:
> Hi,
> 
> Can anyone suggest a quick way to get a count of the number files owned
> by each uid, or alternatively, print each unique uid that exists in the
> filesystem?  Bonus points for doing the same thing for gid's in the same
> pass.

Thanks for the other suggestion.

I finally used the correct search terms and found what I wanted.  I'm
running this now, but it's taking a while.

find / -path /tmp -prune -o -path /sys -prune -o -path /proc -prune -o -printf 
%u:%g\\n | awk '{usergroup[$0]++}; END {for(key in usergroup) printf "%-20s 
%d\n",key,usergroup[key]}'

Next time I will probably add "-uid +499", as I'm not interested in
system accounts.


galen
-- 
Galen Seitz
gal...@seitzassoc.com
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to