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
3a31bfbb
Unverified
Commit
3a31bfbb
authored
Jun 04, 2017
by
Bruno Sutic
Browse files
Use 'xargs rm' instead of 'find -delete'
parent
241f6208
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/save.sh
View file @
3a31bfbb
...
...
@@ -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
()
{
...
...
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