Last active
October 24, 2021 13:15
-
-
Save davepullig/4a8b4e88b2d90b179a9419294f38a7a2 to your computer and use it in GitHub Desktop.
Get the top 50 visiting class-C networks from nginx log files.
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
cat access.log | cut -d "." -f 1,2,3 | sort -n -t. -k1,1 -k2,2 -k3,3 | uniq -c | sort -n -r -s | head -n 50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment