Skip to content

Instantly share code, notes, and snippets.

@24HOURSMEDIA
Created August 16, 2017 05:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 24HOURSMEDIA/de04071ffa4221a9c3ce2f1c67c148b2 to your computer and use it in GitHub Desktop.
Save 24HOURSMEDIA/de04071ffa4221a9c3ce2f1c67c148b2 to your computer and use it in GitHub Desktop.
count number of ips in nginx access log
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