Skip to content

Instantly share code, notes, and snippets.

@SaeedSoltoon
Last active January 7, 2020 11:26
Show Gist options
  • Save SaeedSoltoon/c35250ea08f44fb7dfe34f2838edcf89 to your computer and use it in GitHub Desktop.
Save SaeedSoltoon/c35250ea08f44fb7dfe34f2838edcf89 to your computer and use it in GitHub Desktop.
Get list of all user agents from nginx access log
awk -F'"' '/GET/ {print $6}' /var/log/nginx-access.log | cut -d' ' -f1 | sort | uniq -c | sort -rn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment