Linux - disk usage (du) human readable and sorted by size (earthinfo.org)
This is quick tip to fix a problem that has always bugged me - When showing disk usage in a human readable form (KB, MB, GB) for each subdirectory using “du -sh *”, how can you properly sort it into size order?
2 comments
[ 184 ms ] story [ 151 ms ] threaddu -s * 2>/dev/null | sort -n | cut -f2 | xargs du -sh 2>/dev/null