Forrest logo
back to the du tool

du:ai:422fc

sort folders by size
$ du -hs */ | sort -rh
try on your machine

This command uses the 'du' command to calculate the size of each folder in the current directory, sorts them in descending order using 'sort -rh', and displays the result.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • sort folders by size?
back to the du tool