From d04972026f3a34cdf966d0d256dac5f52431dcf0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 02:44:37 +0100 Subject: [PATCH] fix selecting removal backups code Signed-off-by: Nico Schottelius --- ccollect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccollect b/ccollect index 5a254da..138a809 100755 --- a/ccollect +++ b/ccollect @@ -445,7 +445,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do remove="$((${count} - ${c_interval} + 1))" _techo "Removing ${remove} backup(s)..." - ls -${TSORT}d1r | grep "${INTERVAL}\\." | head -n "${remove}" > "${TMP}" || \ + ls -${TSORT}1r | grep "^${INTERVAL}\\." | head -n "${remove}" > "${TMP}" || \ _exit_err "Listing old backups failed" delete_from_file "${TMP}"