Skip to content

Commit 5f3873c

Browse files
author
Eugene Van Dam
committed
remove_old_backups() : replace xargs with -exec to handle 0 files found
by find better
1 parent dcef219 commit 5f3873c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/save.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ remove_old_backups() {
283283
local -a files
284284
files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6))
285285
[[ ${#files[@]} -eq 0 ]] ||
286-
find "${files[@]}" -type f -mtime +30 | xargs rm
286+
find "${files[@]}" -type f -mtime +30 -exec rm -v "{}" \;
287287
}
288288

289289
save_all() {

0 commit comments

Comments
 (0)