using mtime instead of atime with find #3

Merged
adellam merged 1 commits from tpiccioli-patch-1 into master 2023-03-03 18:05:41 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ create_backup_dirs() {
cleanup_old_backups() {
# Remove the old backups
find ${HISTDIR} -atime +${N_DAYS_TO_SPARE} -type f -exec rm -f {} \;
find ${HISTDIR} -mtime +${N_DAYS_TO_SPARE} -type f -exec rm -fv {} \;
# TODELETE=$( /bin/ls "${HISTDIR}/" | awk -F '.' '{print $NF}' | sort -ruV | tail -n +${N_DAYS_TO_SPARE} )
# for i in ${TODELETE}
# do