[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: file /directory size on svnServer?

From: Campbell Allan <campbell.allan_at_sword-ciboodle.com>
Date: Fri, 19 Mar 2010 13:12:06 +0000

On Wednesday 17 Mar 2010, netvampire.tw wrote:
> Is there any command can show files / directories size on the server? I
> want to know if I have enough space before checkout Thanks

I don't believe there is a command, it's difficult to get an accurate answer
as each operating system has different overheads. If you are on unix then you
could try this one liner, just replace SVNURL with the repository url you'd
like to guess the size of.

svn ls -v -R SVNURL | perl -e 'my $total = 0; while(<>) { if( /^(?:\s+\S+)
{2}\s+(\d+)/ ) { $total += $1; } } my $svntotal = $total * 3; print "Total
file size: $total bytes, estimated checkout size $svntotal bytes\n";'

I'm estimating at least three times the size for the checkout (this is with a
1.5 client) based on one repository I have available but I had originally
guessed at twice the size plus a little for the administration directories
and found it way off. The total bytes will be off as well though as this does
not take into account filesystem overheads. In my test case the full checkout
was around 884mb as measured by du -bs, deleting the .svn directories
resulted in a size of 306mb yet summing up all the file sizes is 270mb
according to the script.

-- 
__________________________________________________________________________________
Sword Ciboodle is the trading name of ciboodle Limited (a company 
registered in Scotland with registered number SC143434 and whose 
registered office is at India of Inchinnan, Renfrewshire, UK, 
PA4 9LH) which is part of the Sword Group of companies.
This email (and any attachments) is intended for the named
recipient(s) and is private and confidential. If it is not for you, 
please inform us and then delete it. If you are not the intended 
recipient(s), the use, disclosure, copying or distribution of any 
information contained within this email is prohibited. Messages to 
and from us may be monitored. If the content is not about the 
business of the Sword Group then the message is neither from nor 
sanctioned by us.
Internet communications are not secure. You should scan this
message and any attachments for viruses. Under no circumstances
do we accept liability for any loss or damage which may result from
your receipt of this email or any attachment.
__________________________________________________________________________________
Received on 2010-03-19 14:12:48 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.