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:
commit
c3f33257ad
|
@ -46,7 +46,7 @@ create_backup_dirs() {
|
||||||
|
|
||||||
cleanup_old_backups() {
|
cleanup_old_backups() {
|
||||||
# Remove the 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} )
|
# TODELETE=$( /bin/ls "${HISTDIR}/" | awk -F '.' '{print $NF}' | sort -ruV | tail -n +${N_DAYS_TO_SPARE} )
|
||||||
# for i in ${TODELETE}
|
# for i in ${TODELETE}
|
||||||
# do
|
# do
|
||||||
|
|
Loading…
Reference in New Issue