From f3fb68cb29ef3822994862c12bbc244ea100db94 Mon Sep 17 00:00:00 2001 From: Naum Soloveychik Date: Mon, 20 Jan 2020 13:26:37 +0300 Subject: [PATCH] Update mysql_backup.sh --- mysql_backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql_backup.sh b/mysql_backup.sh index a1c2e2b..e1968d2 100755 --- a/mysql_backup.sh +++ b/mysql_backup.sh @@ -136,7 +136,7 @@ echo $$ > ${pidfile} ; prefix="mysqldump.`hostname -s`.${name}"; -if [ `ls ${dir} | grep ${prefix} | wc -l` -ge "${copies}" ] ; then +if [ `ls -t ${dir} | grep ${prefix}` -ge "${copies}" ] ; then i=1 ;