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

In C-Shell, how can I get the same output as du -sh ./* but without listing the files in the root dir, i.e. just a list of subdirectories in ./ and the sizes of all their contents?

share|improve this question
I don't get it. I tried sh and csh and except for ordering the output is the same. (I have to admit that I am actually using bash and tcsh.) – Shi Aug 12 '11 at 22:02
@Shi I should clarify: the comment about C-Shell is just to specify what I'm using. I'm seeking another command or options that will give me the same result, but without listing the sizes of the files in ./ – jonnat Aug 12 '11 at 22:13
up vote 32 down vote accepted

Add a trailing slash, like:

du -sh ./*/
share|improve this answer
Thank you Klox, simple and right on the mark. – jonnat Aug 12 '11 at 22:33
This is one of the fastest Stack Exchange fixes I've had. +2 if I could. – Matthew Jan 3 at 0:08

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.