Do not output deleted files to stdout

This commit is contained in:
Bruno Sutic 2020-08-17 10:32:11 +02:00
parent e815c50f13
commit 123d83c668
No known key found for this signature in database
GPG Key ID: CAFA7B1B2914ED81

View File

@ -274,7 +274,7 @@ remove_old_backups() {
local -a files local -a files
files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6)) files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6))
[[ ${#files[@]} -eq 0 ]] || [[ ${#files[@]} -eq 0 ]] ||
find "${files[@]}" -type f -mtime "+${delete_after}" -exec rm -v "{}" \; find "${files[@]}" -type f -mtime "+${delete_after}" -exec rm -v "{}" \; > /dev/null
} }
save_all() { save_all() {