Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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