du command sort by size code example
Example 1: ubuntu du sort by dir size
du -Sh /path/to/dir | sort -rh | head -20
Example 2: centos largest folders
# du -Sh | sort -rh | head -5
du -Sh /path/to/dir | sort -rh | head -20
# du -Sh | sort -rh | head -5