Skip to content

Instantly share code, notes, and snippets.

@ibrow
Created April 2, 2011 23:34
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 ibrow/900014 to your computer and use it in GitHub Desktop.
Save ibrow/900014 to your computer and use it in GitHub Desktop.
Useful log analysis commands
# total non static pages a bot has scraped
awk '$7!~/css|png|jpeg|jpg|gif|js|ico/ {print $7}' /var/log/nginx/access.log | wc -l
# output error messages
awk '$3!~/notice|info/' error.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment