in reply to Script to show space usage by users in home partition
TIMTOWTDI and all, but I'd just parse the output of:
# most linuxes ship with du that has --max-depth $ du -h --max-depth 1 /home # OR *bsds ship with du that has -d $ du -h -d 1 /home
... and look for likely offenders by grepping for high values of M or just G, i.e. output from above on my system:
518K /usr/home/colette 7.5M /usr/home/uvnet 74M /usr/home/dsia 1.3G /usr/home/kcowgill 4.0K /usr/home/kimc
At least you don't have to do a lot of work that du can do for you - which is more portable (installed on every *nix) than dhog (?) which I've honestly never heard of before.
As the output of du with the -h (human readable) flag (along with some kind of depth flag) is easily readable, implementation is left as an exercise for the, uh ... reader. :-)
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Script to show space usage by users in home partition
by klekker (Pilgrim) on Jan 12, 2007 at 09:18 UTC |