Skip to content

Instantly share code, notes, and snippets.

@brokendish
Created February 4, 2012 12:08
Show Gist options
  • Save brokendish/1737461 to your computer and use it in GitHub Desktop.
Save brokendish/1737461 to your computer and use it in GitHub Desktop.
N日前のログをTRAで固めて削除する
#N日前のログをTRAで固めて削除する
find ./access.log* -mtime +20|xargs tar cvzf 2011_access.log.tar.gz
find ./access.log* -mtime +20|xargs rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment