Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christian Salzmann-Jaeckel
tmux-resurrect
Commits
5f3873c5
Commit
5f3873c5
authored
Oct 25, 2017
by
Eugene Van Dam
Browse files
remove_old_backups() : replace xargs with -exec to handle 0 files found
by find better
parent
dcef2199
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/save.sh
View file @
5f3873c5
...
...
@@ -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
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment