Find largest folder in SSH

Find largest folder in ssh

Is your cPanel server running out of space? Need to find out where the usage is coming from?

Finding the largest folder is as easy as running the following simply command from an SSH (or Terminal in cPanel’s WHM) session:

du -hs * | sort -rh | head -5

The above command will output the largest folders in the current directory in a human readable format that is easy to understand.

You can continue to further nail down the source of the usage by entering the next folder and entering the above command again and again until you find the exact source of the high usage.