Skip to content

Commit 9c7ec63

Browse files
authored
Merge pull request #210 from eugenevd/20171014-remove_old_backups-find
remove_old_backups() : replace xargs with -exec to handle 0 files found better
2 parents dcef219 + 5f3873c commit 9c7ec63

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)