Created
November 10, 2016 11:16
-
-
Save ichadhr/261e43116293748cb2bb515c0cd057e9 to your computer and use it in GitHub Desktop.
Cleaning Log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Deleting log file" | |
| sudo -s -- <<EOF | |
| find /var/log -type f -regex ".*\.gz$" -delete | |
| find /var/log -type f -regex ".*\.[0-9]$" -delete | |
| echo "Done." | |
| EOF | |
| exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment