diff --git a/libraries/util.bash b/libraries/util.bash index 1d857d57..8ce8fc1a 100644 --- a/libraries/util.bash +++ b/libraries/util.bash @@ -1906,7 +1906,18 @@ function resetLogs() { header 'RESETTING LOGS' - find '/var/log' -type f \( -regex '.*\.[0-9]+' -o -regex '.*\.[0-9]+\.gz' -o -regex '.*\.old' \) -delete -print + find '/var/log' \ + -type f \ + \( \ + -regex '.*-[0-9]+' -o \ + -regex '.*\.[0-9]+' -o \ + -regex '.*\.[0-9]+\.gz' -o \ + -regex '.*\.xz' -o \ + -regex '.*\.old' \ + \) \ + -delete \ + -print + find '/var/log' -type f -exec cp -f '/dev/null' '{}' \; -print }