X-Git-Url: http://git.megabrutal.com/?p=mgsautils.git;a=blobdiff_plain;f=mysql%2Fmysqlbak_check.sh;h=48c7beabb01d9c7b14e0b6394a74566cc17a055d;hp=ca63a5803f84eadab58da2ac4f2a908e44180bdd;hb=0ff0a58157fc0acd3e9ab407ce8be25bcea01a97;hpb=01154dccd3a2f80cba40c5dfab1b3b86f521494d diff --git a/mysql/mysqlbak_check.sh b/mysql/mysqlbak_check.sh index ca63a58..48c7bea 100755 --- a/mysql/mysqlbak_check.sh +++ b/mysql/mysqlbak_check.sh @@ -2,6 +2,7 @@ # By MegaBrutal # # Changelog: +# 2015-08-15: Truncate file lists and show statistics # 2014-09-13: Changed bzip2 test to tar tvf # 2014-01-03: Last known modification before changelog @@ -48,8 +49,15 @@ do fi echo echo - echo "Other backup files present (most recent at top):" - ls -lt ${BAKDIR}/* + echo "Recent 20 backups:" + ls -lt ${BAKDIR}/* | head -20 + echo + echo "Oldest 20 backups:" + ls -lt ${BAKDIR}/* | tail -20 + echo + echo + DU=$(du -sb ${BAKDIR} | cut -f1) + echo "Total number of files: $(ls -1 ${BAKDIR} | wc -l), taking ${DU} bytes ($(expr ${DU} / 1048576) megabytes) of disk space." echo echo echo