Created
December 20, 2015 14:43
-
-
Save jahil/66e50000d975f9928b51 to your computer and use it in GitHub Desktop.
X-Forwarded-For IP Address Extract Uniq Apache Logs
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
tail -f access_log | awk '{ $1="";print}' | grep -o '\([0-9]\{2,3\}.\)\{3\}\.[0-9]\{2,3\}' | |
cat access_log | awk '{ $1="";print}' | grep -o '\([0-9]\{2,3\}.\)\{3\}\.[0-9]\{2,3\}' | sort -n | uniq -c | sort -nr | head -20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment