Skip to content

Instantly share code, notes, and snippets.

@timf
Created May 18, 2011 22:13
Show Gist options
  • Save timf/979708 to your computer and use it in GitHub Desktop.
Save timf/979708 to your computer and use it in GitHub Desktop.
diskspace alias
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