Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 9 '10 at 4:18

2 Answers 2

up vote 1 down vote accepted

Linux box?

du -csh /path/to/directory

share|improve this answer
    
great. how do i show the measurement in gb? –  HollerTrain Nov 9 '10 at 3:01
    
The -h should make it "human readable".. Just look for the G and M next to the directory names. –  erimar77 Nov 9 '10 at 3:05

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". :-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.