From 794cde89801c7088375c8d9d10d564cbc90f0abc Mon Sep 17 00:00:00 2001 From: Alex Handlovits Date: Mon, 1 Mar 2021 15:29:23 -0500 Subject: [PATCH] fix(info): get most recent backup instead of oldest (#3319) --- lgsm/functions/info_distro.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 555cca69b..7e0e6534d 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -205,7 +205,7 @@ if [ -d "${backupdir}" ]; then # number of backups. backupcount=$(find "${backupdir}"/*.tar.gz | wc -l) # most recent backup. - lastbackup=$(find "${backupdir}"/*.tar.gz | head -1) + lastbackup=$(find "${backupdir}"/*.tar.gz | tail -1) # date of most recent backup. lastbackupdate=$(date -r "${lastbackup}") # no of days since last backup.