Disk usage information of a user

Rodolfo Alcázar rodolfo.alcazar at padep.org.bo
Tue Dec 21 14:13:39 UTC 2004


El mar, 21-12-2004 a las 15:06 +0100, nodata escribió:
> > El mar, 21-12-2004 a las 21:41 +0800, Lai Zit Seng escribió:
> >> On Tue, 21 Dec 2004, Paul Howarth wrote:
> >> >>  On my server I have 150 users, and their Home folders are located in
> >> the
> >> >> /home directory.
> >> >> the question is, how I can see the DISC USAGE for each user ?.
> >
> > try
> >
> > # du --max-depth=1 -h
> 
> cd /home
> du -sk * | sort -n

Well, I really use this script, which sorts the output:

#!/bin/bash
for a in `du --max-depth=1 --block-size=1024 | sort -n |cut -f 2 -d '.'|
grep '/'|cut -f 2 -d '/'`
do
        du $a --max-depth=0 -h
done
echo Total:
du --max-depth=0 -h

-- 
Rodolfo Alcázar (rodolfo.alcazar at padep.org.bo)
Administrador datos y red - Padep/GTZ
La Paz, Bolivia




More information about the fedora-list mailing list