一条霸气的分析binlog的命令

/u01/percona55_debug/bin/mysqlbinlog -vv   mysql-bin.000039    |  \
   grep -i -e "^update" -e "^insert" -e "^delete" -e "^replace" -e "^alter"  | \
   cut -c1-100 | tr '[A-Z]' '[a-z]' |  \
   sed -e "s/\t/ /g;s/\`//g;s/(.*$//;s/ set .*$//;s/ as .*$//" | sed -e "s/ where .*$//" |  \
   sort | uniq -c | sort -nr 
posted @ 2012-08-27 10:33  killkill  阅读(1003)  评论(0编辑  收藏  举报