Quantcast
Viewing latest article 2
Browse Latest Browse All 10

How to sort the directories based on their sizes?

Solution

Use the du command with the sort command as

$ du -s * | sort -rn

747624    work
23856    cards
7040    postie
680    convert
120    thumbs

This will list the the size in bytes for the directories in the current directory based on the descending order of their sizes.


Viewing latest article 2
Browse Latest Browse All 10

Trending Articles