Created
September 26, 2015 17:36
-
-
Save CamW/236c802a880b7d21da33 to your computer and use it in GitHub Desktop.
Count unique downloads 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
#One liner to count the number of unique downloads by IP address of a specific file | |
#This is based on a default install on Centos 7, you may need to change the path to your log file. | |
awk '/YOUR_FILE_NAME/ {print $1}' < /var/nginx/log/access.log|sort|uniq|wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment