Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbtek committed Jun 21, 2018
1 parent e15204a commit b3c9a3a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion libraries/util.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit b3c9a3a

Please sign in to comment.