How can i find which files & directories are taking up the most disk space?

This can be very helpful to know, for various reasons. You will need to be logged into your dedicated server or VPS server via SSH, as this command will require you to be logged in via SSH.

du -ha /home/user | sort -n -r 

Replacing "/home/user" with the directory for which you want to know the disk space used for that particular directory. You will see an example output like below 

root@localhost[~]# du -ha /home/user | sort -n -r

228K    .

64K     ./mail

56K     ./.cpanel

28K     ./tmp

28K     ./.fantasticodata

28K     ./.cpanel/datastore

24K     ./.cpanel/caches

16K     ./mail/.Trash

16K     ./mail/.Sent

16K     ./mail/.Drafts

12K     ./.cpanel/caches/filesys

8.0K    ./tmp/cpbandwidth

8.0K    ./public_html

8.0K    ./public_ftp

reviewed: 10/17/2016

  • Email, SSL
  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

How do I find my root password?

1) Log into your billing account: 2) Click on the...

How to generate a CSR in WHM

You would like to purchase or transfer an SSL certificate but need a CSR to do so. Here's how to...

Changing ip addresses

To move an account from one ip to another in WHM:1) Log into WHM using root login details....

-DELETE How to downgrade MySQL from Version 5 to Version 4

If you've upgraded your MySQL Software to the newest version but for whatever reason need to...

How to disable Recursive DNS Lookups

A very common PCI Issue is related to the DNS servers.  In order to be PCI Compliant you must...