When I tried to create local repository of Ubuntu, I was haunted by an unanswered question: How big will it be?
Googling and diving into ubuntuforums.org gave me no solution.
Then, a friend in Ubuntu-id mailing list gave me the answer: calculate the size from every packages listed in Package.gz.
This is a sample (ugly) script I used to get main repository size calculated.
$ wget http://id.archive.ubuntu.com/ubuntu/dists/breezy/main/binary-i386/Packages.gz -O - |zcat|sed 's/Installed-Size://'|grep Size|awk '/Size:/ {pkgsize+=$2} END {print "package size = "pkgsize" Bytes"}'
The size of other repositories can be calculated by simply changing the path of Packages.gz
Subscribe to:
Post Comments (Atom)
1 comment:
I am using debmirror
I wrote about it in my previous post
The script is ugly though... but it works :-)
Post a Comment