Folder Size in Linux

Люба х...ня

If you will ever have to get a folder size, copypaste the following lines:

# folder size with all attachments 
du -sh
#  display folder sizes
du -sh *
#  sort folders by size
du -s *| sort -nr
# in MB if needed
du -sm *| sort -nr

Unfortunately, a more convenient key h ("human" – auto select of Kb/Mb/Gb) doesn't work here, because it sorts by numbers leaving out units -  Kb/Mb/Gb.
That's why we use a long command:

du -s *|sort -nr|cut -f 2-|while read a;do du -hs $a;done
Let’s fill the brief, shall we?