Merge pull request 'using mtime instead of atime with find' (!3) from tpiccioli-patch-1 into master

Reviewed-on: #3
This commit is contained in:
Andrea Dell'Amico 2023-03-03 18:05:39 +01:00
commit c3f33257ad
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