Skip to content

Instantly share code, notes, and snippets.

@kymtwyf
Created April 22, 2016 16: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 kymtwyf/c2f80375190310633e29f1c134698cee to your computer and use it in GitHub Desktop.
Save kymtwyf/c2f80375190310633e29f1c134698cee to your computer and use it in GitHub Desktop.
clean /var/log/nginx logs

reference

cd /var/log/nginx
mv access.log access.log.old
mv error.log error.log.old
kill -USR1 `cat /var/run/nginx.pid`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment