Skip to content

Instantly share code, notes, and snippets.

@Fleshgrinder
Created September 1, 2014 14:15
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 Fleshgrinder/c96dc10a01e7e85ecef1 to your computer and use it in GitHub Desktop.
Save Fleshgrinder/c96dc10a01e7e85ecef1 to your computer and use it in GitHub Desktop.
Purge /var/log daily cron
#!/bin/sh
find /var/log -regextype posix-extended -regex '.*\.([0-9]|gz)$' -type f -exec rm -f {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment