From 3a31bfbbb835c3d32f25702182cb5deab2a612ae Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Sun, 4 Jun 2017 00:52:37 +0200 Subject: [PATCH] Use 'xargs rm' instead of 'find -delete' --- scripts/save.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/save.sh b/scripts/save.sh index 0f95982..70f663b 100755 --- a/scripts/save.sh +++ b/scripts/save.sh @@ -282,7 +282,8 @@ remove_old_backups() { # remove resurrect files older than 30 days, but keep at least 5 copies of backup. local -a files files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6)) - [[ ${#files[@]} -eq 0 ]] || find "${files[@]}" -type f -mtime +30 -delete + [[ ${#files[@]} -eq 0 ]] || + find "${files[@]}" -type f -mtime +30 | xargs rm } save_all() {