diff --git a/utils/repo-size.sh b/utils/repo-size.sh index ee6a334..a0095fd 100755 --- a/utils/repo-size.sh +++ b/utils/repo-size.sh @@ -1,21 +1,21 @@ #!/bin/bash -SIZE=$(ssh c4science-backup time du --max-depth=1 /backup/repo/) +SIZE=$(ssh c4science-backup du --max-depth=1 /backup/repo/) #SIZE=$(cat /tmp/size) SORT=$(echo "$SIZE" | sort -n) LIMIT=2 #GB echo '| size | repo | username | email' echo '| --- | --- | --- | ---' while read -r i; do size=$(echo $i | awk '{print $1}') if [ "$size" -gt "$(($LIMIT*1024*1024*1024))" ]; then repo=$(echo $i | awk '{print $2}' | cut -c 14-) author=$(./get_repo_author.sh $repo | tail -n 1) echo -n "| $(echo $size | numfmt --to=iec --suffix=B) " echo -n "| R$repo " echo $author | awk '{print "| ",$1," | ",$2}' fi done <<< "$SORT"