Ubuntu – get directory sizes recursively

du -h -d 1 .

Ordering this by size can be done by;

du -h -d 1 . | sort -h

Adding ‘r’ in the sort options (… | sort -rh ) will sort it in reverse order (largest at the top)

Leave a Reply