Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I want to read the size of a folder from the command line. ls -lh shows all folders as being 4k, which presumably is the size of the footprint of the folder itself, rather than the contained files. I would like to read the size of all contained files within the folder. is this possible?

share|improve this question
up vote 5 down vote accepted

You can use the du command:

du -sh foldername
share|improve this answer
du -s folder

-s stands for summarize.

share|improve this answer

You can also use

du -csh foldername/*

which gives file and folder sizes under "foldername" separately and the total size in last row.

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.