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

I'm using svn on a project and I'm trying to see how much file space all of the .svn folders are taking up.

If I do something like

du -h | egrep ".*\.svn$"

It will list all of the .svn folders and their sizes, but on 3k+ lines. How can I total all these lines (or perform an operation that would give me the equivalent result)?

share|improve this question
up vote 2 down vote accepted
du -shc `find . -name .svn -print`

-print can be omitted if you are using find from GNU coreutils.

share|improve this answer
    
Did the trick. Didn't know about the -c option. Thanks. – Steve Robbins Oct 17 '12 at 23:44

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.