Permalink
Browse files

more stats

  • Loading branch information...
1 parent 738e001 commit b5c5bbb219ccc859c55d24dfa63667c9a8b02835 @albertz committed Mar 10, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 stats.sh
View
@@ -6,16 +6,19 @@ SRCDIR="$HOME/screenies"
zmodload zsh/stat
sizesum=0
+numfiles=0
./bin/db-list-dir | while read l; do
[[ "$l" =~ "^file: /(.*), .*, .*$" ]] && {
fn="$match"
size="$(stat -L +size $SRCDIR/$fn)"
sizesum=$(($sizesum + $size))
+ numfiles=$(($numfiles + 1))
}
done
dbsize="$(stat -L +size $DBFILE)"
+echo "num files: $numfiles"
echo "fs size: $(($sizesum / 1024 / 1024.0)) MB"
echo "db size: $(($dbsize / 1024 / 1024.0)) MB"

0 comments on commit b5c5bbb

Please sign in to comment.