find(\&offenders, $dir); sub offenders{ # do not include links return if (-l); # owner of file but skip # if owner is not a user # (uid < 500) $uid = (lstat($_))[4]; #return if ($uid < 500); if ($uid < 500){ print "UID is $uid, skipping $File::Find::dir $_\n"; return; } # scan only regular files if (-f){ $uname = getpwuid $uid; # gather name of file $fname = $File::Find::name; # size of file (kb) $size = (lstat($_))[7]; $size = int($size/1000); # keep running total of each # user's space use $size{$uname} += $size; } }