Skip to content

Instantly share code, notes, and snippets.

@andreasvirkus
Created January 4, 2021 19:17
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 andreasvirkus/20479588dace8eba5243786886140856 to your computer and use it in GitHub Desktop.
Save andreasvirkus/20479588dace8eba5243786886140856 to your computer and use it in GitHub Desktop.
# Command to check access count per unique IP
tail -n 10000 /var/log/apache2/access.log | awk '{print $1}'| sort| uniq -c| sort -nr| head -n 10
# Command to check access per unique pathname
awk {'print $7'} /var/log/apache2/access.log | sort -nk1 | uniq -c | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment