Question : Directory sizes

This command gives me what I want "du -h > files.txt" but how can I get it to sort the list from largest to smallest?

Answer : Directory sizes

Found this:

du -k * | sort -nr | cut -f2 | xargs -d '\n' du -sh

here:

http://ubuntuforums.org/showthread.php?t=885344

Seems to do exactly what you want.
Random Solutions  
 
programming4us programming4us