Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a Linux environment. How can I find out the total space a folder is taking. It would like this total to include ALL sub-directories in the total. I don't want a dump of the size of each subdirectory. Just the total size a directory is taking up with the size of all it's subdirectories included in the c

share|improve this question
up vote 0 down vote accepted

du -sh /path/to/directory

The output will return sumarize and human readeable directory size.

or in MB

du --max-depth=0 --one-file-system -m /path/to/directory

Also, you can create an alias if you will going to execute this command often.
If you want to know more about du command, execute: man du

share|improve this answer
du -sh /path/to/directory

Should do exactly what you want.

share|improve this answer

du --max-depth=0 --one-file-system -m

Gives the size of the current directory in MB, not running past mount-points.

share|improve this answer

The following should work:

$ du -skh <directory>
share|improve this answer

If you're inside the directory, du -skh . works well. Otherwise, du -skh /path/to/directory is good.

The flags on that command mean "-s summary, -k kilobyte listing, -h human-readable suffixes". The "-k" is probably redundant, but a force of habit.

share|improve this answer

Your Answer


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.