Created
January 26, 2014 23:22
-
-
Save ArtiomL/8640817 to your computer and use it in GitHub Desktop.
cln - Space Cleaner
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 | |
# cln - Space Cleaner | |
# (CC0) No Rights Reserved | |
# Artiom Lichtenstein | |
# v1.0, 27/01/2014 | |
apt-get clean | |
find /var/log/. -type f -iregex '.*\.\(gz\|[0-9]\|old\)$' -exec rm {} \; | |
find /var/log/. -maxdepth 1 -type f -exec sh -c '>{}' \; | |
find /var/log/apache2/. -type f -exec sh -c '>{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment