X-Git-Url: https://iankelling.org/git/?p=distro-setup;a=blobdiff_plain;f=mail-backup-clean;fp=mail-backup-clean;h=210173cc96d621163955d9411f9099ef6c435087;hp=9f6b14b0d215d5aec8038396a8626eabe1a9817e;hb=9de134ab81ba8b62daaf276e02f06d5499d0aa3c;hpb=45341164894a4765fba78cb4465ebe13707fe70c diff --git a/mail-backup-clean b/mail-backup-clean index 9f6b14b..210173c 100755 --- a/mail-backup-clean +++ b/mail-backup-clean @@ -38,4 +38,8 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" exit status: $?, PIPESTATUS: ${P # time=$(( $(date -d $(sed -r 's/(.{4})(..)(.{5})(..)(.*)/\1-\2-\3:\4:\5/' <<<$last_snap_date) +%s) -1 )) # find /bu/md -type f \! -newermt @$time -delete +if [[ ! -d /bu/md ]]; then + exit 0 +fi + find /bu/md -type f -mtime +100 -delete