Last active
December 25, 2015 20:39
-
-
Save tkuchiki/7036465 to your computer and use it in GitHub Desktop.
du 降順で、-h のような見やすい format で出力
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
| ionice -c 2 -n 7 nice -n 19 du -a /path/to/dir | sort -nr | awk '{if ($1 < 1000) { printf("%.2fK %s\n", $1, $2); } else if ($1 < 1000000) { printf("%.2fM %s\n", $1 / 1000, $2); } else if ($1 < 1000000000) { printf("%.2fG %s\n", $1 / 1000 / 1000, $2); }}' | head -n 200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment