Created
July 20, 2012 21:28
-
-
Save drsnyder/3153365 to your computer and use it in GitHub Desktop.
Finding the most frequent source ip in an access log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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