Created
November 30, 2020 15:29
-
-
Save peeyush-es/2165724190700458fe927faccc99bca0 to your computer and use it in GitHub Desktop.
grep nginx 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
cat /var/log/nginx/access.log | awk '$4 >= "[30/Nov/2020:15:00:00" && $4 < "[30/Nov/2020:15:01:00"' | awk '{print $7}' | 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