About the Linux...

Monday, October 13, 2008

Sort folders by size with one command

Sort folders by size with one command:
"Entire user’s data is under /home, I need to have a list of all the sub folders sorted by the size of the sub folders.
simple command to get the list of sub folders sorted by their size:

du --max-depth=1 /home/ | sort -n -r"

No comments:

Followers