揮発性のメモ2

http://d.hatena.ne.jp/iww/

テーブル一覧を行数順にソートする

テーブルの一覧を出すコマンドは show table status

mysql -uhoge -phoge tastdb -e "show table status"


1列目がテーブル名、5列目が行数なので、カットしてソートすればOK

mysql -uhoge -phoge tastdb -Ns -e "show table status" |cut -f 1,5 |sort -n -k 2