in reply to Size of mysql database/tables with perl
I am often in need of this info, and I usually resort to the one-liner way. Here is my personal recipe:
$ mysql dbname -e 'show table status' | \ perl -lane '$size += $F[6]+$F[8];END{print $size}'
|
---|
In Section
Cool Uses for Perl