, ,

Fat Ducks – Finding Disk Space Hogs Quickly in Unix


# install numfmt through coreutils
sudo apt-get install -y coreutils

alias ducks='sudo du -cbs * | sort -rn| head -11|numfmt --field 1 --to=iec|column -t'

Add to .bash_aliases

> cat ~/.bash_aliases
alias ducks='sudo du -cbs * | sort -rn| head -11|numfmt --field 1 --to=iec|column -t'
..

> ducks
10TB this
5GB  is
2MB  hello
10KB world

References

1. http://stackoverflow.com/questions/15854332/file-size-in-human-readable-format