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?
Asked
Active
Viewed 451 times
0
-
What OS? Also, the wording suggests you are talking about a web server but you really need to be clear about such things. – John Gardeniers Nov 09 '10 at 04:18
2 Answers
1
Linux box?
du -csh /path/to/directory

erimar77
- 488
- 2
- 8
-
-
The -h should make it "human readable".. Just look for the G and M next to the directory names. – erimar77 Nov 09 '10 at 03:05
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