#!/bin/bash
#                       /usr/local/bin/deleted
# https://crystalfaeries.net/posix/bin/deleted
# celeste:crystalfaery DELETED 2016-11-14 19:15:59+00:00
# http://www.commandlinefu.com/commands/view/14002/list-pr.-command-in-megabytes-sum-of-deleted-files-that-are-still-in-use-and-therefore-consumes-diskspace
lsof -ns | grep "\<REG\>.* (deleted)$" | \
awk '{a[$1]+=$7;b[$1]++;}END{for(i in a){printf("%s %d %.2f MB\n", i, b[i], a[i]/1048576);}}' | \
column -t | sort -k3 -n


syntax highlighted by Code2HTML, v. 0.9.1