this script goes to each filesystem and lists the first level directorys in that filesystem by size in kb. use it if you like alter if you wish but its here.
#! /bin/ksh
#
# This will take a look at all Filesystems NOT left out in the variable FILESYSTEM and
# then find all directoy sizes listed in that filesystem and print them to standard output
# in a formated output. All sizes are in kb.
#
# by: Michael Dooley (dooley.michael@con-way.com)
#
FILESYSTEM=`df -n|grep -v proc|grep -v dev/|awk '{ print $1 }'`
for FS in ${FILESYSTEM};do
FREE=`df -k|grep $FS|awk '{ print $4 }'`
USED=`df -k|grep $FS|awk '{ print $3 }'`
cd $FS
echo "-=Disk Spaceing Script (all sizes are in kb)=-"
echo '\t' by: dooley.michael@con-way.com
echo DISK ${FS}
echo
echo TOTAL AVAILABLE $FREE
echo
echo USED:
echo '\t' $FS
for DIRECTORY in `ls ${FS}`; do
if [[ -d $DIRECTORY ]]; then
du -s $DIRECTORY|awk '{ printf ("%25s\t%-10d\n", $2,$1) }'
fi
done
echo TOTAL USED ${FS}"\t"$USED
echo
done