Created
February 13, 2014 12:05
Revisions
-
sh2 created this gist
Feb 13, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ #!/bin/bash for BINLOG in $@; do echo $BINLOG $(mysqlbinlog $BINLOG 2>/dev/null | awk '/^#[0-9]/ { print $1, $2 }' | head -1) done == $ ./list.sh mysql/binlog/* mysql/binlog/mysql-binlog.000001 #140206 18:14:57 mysql/binlog/mysql-binlog.000002 #140207 11:13:14 mysql/binlog/mysql-binlog.000003 #140207 13:04:08 mysql/binlog/mysql-binlog.000004 #140207 17:20:55 mysql/binlog/mysql-binlog.000005 #140213 20:19:57 mysql/binlog/mysql-binlog.index