Dammit! Someone always beats me to the punchline! Anyway, I have another good solution:
Code:
du --exclude boot --exclude home -ahB K / 2>/dev/null\
| perl -e 'my @a; while(<>) { chomp; unless (-d (substr($_,\
index($_,"/")))) { push(@a,$_); }}@b = sort {$b <=> $a}\
@a; foreach (@b) { print"$_\n";}'
Of course, you can remove the '2>/dev/null' if you're root, and change the "size granularity" by changing 'K' in 'du -ahB K' to things like "M" for megabytes, "G" for gigabytes, etc.
Of course, my script removes directory sizes (which
du outputs as default), and will sort top to bottom the largest files on the system. Also, as long as you use absolute paths, this script will recursively list largest files in
any directory; just change "/" after '-ahB K' to '/example/dir' and remove the '--exclude' entries! Thanks perl!