0

My client is using up to 300GB of disk space across three subdomains. Is there an easy way to see what is being used? For example, I would be able to see each subdomain and the size they are taking, and even each directory inside the subdomains? using ssh, or opensource application?

Zach Smith
  • 278
  • 2
  • 11

2 Answers2

1

Linux box?

du -csh /path/to/directory

erimar77
  • 488
  • 2
  • 8
0

For a detailed set of directory usage, I like to use:

du -x /path/to/top/directory | sort -rn | less

This will show the use of each directory (and all it's sub-contents), sorted with the largest at the top. The "-x" option is useful if the proc, sys, or other virtual file-systems are mounted (say you are running a du of the root directory).

For example, my 1.5GB /var has use like:

1572347     /var
1161430     /var/lib
1049414     /var/lib/pgsql
1049412     /var/lib/pgsql/data
934120      /var/lib/pgsql/data/base
857420      /var/lib/pgsql/data/base/16398
214904      /var/cache
188599      /var/cache/yum/i386/14
188599      /var/cache/yum/i386
188599      /var/cache/yum

Ah, I see it's time to do a "yum clean all". :-)

Sean Reifschneider
  • 10,720
  • 3
  • 25
  • 28