Created
August 16, 2017 05:50
-
-
Save 24HOURSMEDIA/de04071ffa4221a9c3ce2f1c67c148b2 to your computer and use it in GitHub Desktop.
count number of ips in nginx access log
This file contains 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
Count IP's and sort in nginx access log | |
from: https://www.mkyong.com/nginx/count-ip-address-in-nginx-access-logs/ | |
``` | |
sudo awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -nr | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment