Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

up vote 16 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

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.