Skip to content

Instantly share code, notes, and snippets.

@baepiff
Created August 23, 2012 02:11
Show Gist options
  • Select an option

  • Save baepiff/3431336 to your computer and use it in GitHub Desktop.

Select an option

Save baepiff/3431336 to your computer and use it in GitHub Desktop.
Remove log file script
#!/bin/bash
LOG_DIR="/usr/local/app/*/logs"
#old log erase
find ${LOG_DIR} -type f -name "myAllipcation*" -mtime +31 | xargs rm -f
find ${LOG_DIR} -type f -name "gc.log*" -mtime +31 | xargs rm -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment