Skip to content

Instantly share code, notes, and snippets.

@csexton
Created December 27, 2012 01:10
Show Gist options
  • Save csexton/4384589 to your computer and use it in GitHub Desktop.
Save csexton/4384589 to your computer and use it in GitHub Desktop.
Pretty, human readable version of `du` that will let you drill down and find where all your harddrive space has gone.
alias duf='du -sk * | sort -n | perl -ne '\''($s,$f)=split(m{\t});for (qw(K M G)) {if($s<1024) {printf("%.1f",$s);print "$_\t$f"; last};$s=$s/1024}'\'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment