Skip to content

Instantly share code, notes, and snippets.

@drsnyder
Created July 20, 2012 21:28
Show Gist options
  • Save drsnyder/3153365 to your computer and use it in GitHub Desktop.
Save drsnyder/3153365 to your computer and use it in GitHub Desktop.
Finding the most frequent source ip in an access log
cat access.log | awk '{ a[$2]++ } END { for (d in a) { printf("%d %s\n", a[d], d) } }' | sort -nr | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment