In order to list files or folders by size, you can use this command:

 

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

 

Natively, “du” doesn’t offer a standard argument for listing results by size, so you will have to improvise a bit like in the upper command 🙂

 

Leave a Reply