Created
February 13, 2014 12:05
-
-
Save sh2/8973934 to your computer and use it in GitHub Desktop.
List start time of MySQL binary logs
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 characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment