Skip to content

Instantly share code, notes, and snippets.

@xthiago
Created March 12, 2014 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xthiago/9514054 to your computer and use it in GitHub Desktop.
Save xthiago/9514054 to your computer and use it in GitHub Desktop.
Script para apagar logs e tmp
#! /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