Commit 5f3873c5 authored by Eugene Van Dam's avatar Eugene Van Dam
Browse files

remove_old_backups() : replace xargs with -exec to handle 0 files found

by find better
parent dcef2199
......@@ -283,7 +283,7 @@ remove_old_backups() {
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 | xargs rm
find "${files[@]}" -type f -mtime +30 -exec rm -v "{}" \;
}
save_all() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment