#!/bin/ksh

#File: whos_usin_it

exec 3</etc/passwd
IFS=:
while read -u3 login passwd uid gid comment home_dir shell
 do
  if [ $uid -ge 500 ]
  then
   echo "$login using "`du -s $home_dir | cut -f1`" blocks"
  fi
 done | sort +2 -t" " -rn
