Created
May 30, 2012 23:44
-
-
Save pce/2839597 to your computer and use it in GitHub Desktop.
cat ~/.bash_alias >> ~/.bashrc && source ~/.bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# duh - disk usage humanreadable, source 'inataysia' reddit | |
alias duh='du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment