From d54132bfd7cc569cfef7beda0860a375625383ea Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 7 Sep 2022 00:58:01 +0300 Subject: Tool to calculate the size of a zchain --- bin/calculate-size | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 bin/calculate-size (limited to 'bin') diff --git a/bin/calculate-size b/bin/calculate-size new file mode 100755 index 0000000..640d841 --- /dev/null +++ b/bin/calculate-size @@ -0,0 +1,9 @@ +#!/bin/bash +extract-cids > to_stats +sum=0 ; while IFS="" read -r p || [ -n "$p" ] +do + num=$(ipfs block stat $p | grep Size | sed -e 's/Size: //g') + sum=$(expr $sum + $num ) +done < to_stats +echo "Chain is : $sum bytes" +rm to_stats -- cgit v1.2.3