Skip to content

Instantly share code, notes, and snippets.

@drsnyder
Created July 21, 2012 00:44
Show Gist options
  • Save drsnyder/3154052 to your computer and use it in GitHub Desktop.
Save drsnyder/3154052 to your computer and use it in GitHub Desktop.
Top IP access log requesters by frequency
#!/bin/bash
TMP=$(mktemp)
awk '{ a[$2]++ } END { for (d in a) { printf("%d %s\n", a[d], d) } }' | sort -nr > $TMP
head -20 $TMP
echo "see $TMP for the whole list"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment