Created
March 12, 2014 19:09
-
-
Save xthiago/9514054 to your computer and use it in GitHub Desktop.
Script para apagar logs e tmp
This file contains 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/sh | |
# apaga tmp | |
find /tmp/ -type f -print -delete | |
# apaga logs compactados | |
find /var/log/ -type f -iname *.gz -print -delete | |
# zera conteudo dos logs | |
find /var/log/ -type f -print -exec truncate -s 0 {} \; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment