#!/bin/sh # spacehogs-bypartition for p in `/etc/mount | awk '$5 != "nfs" { print $3 }'` do echo "Usage on partition $p" find $p -xdev -type f -exec /bin/ls -ls {} ';' | awk ' { using[$4] += $1 } END { for (name in using) { print using[name], name }}' | sort -nr | head done exit 0