Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

up vote 1 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.