-
-
Save bugcy013/11359695 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # From http://derblub.com/human-readable-and-by-size-sorted-disk-usage-in-bash | |
| function duf { | |
| 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