Skip to content

Instantly share code, notes, and snippets.

@westonwatson
Created April 7, 2020 13:48
Show Gist options
  • Save westonwatson/d40f77a51d525412e3d524a55c40615d to your computer and use it in GitHub Desktop.
Save westonwatson/d40f77a51d525412e3d524a55c40615d to your computer and use it in GitHub Desktop.
Extract URI from apache access logs
cat access.log | awk -F\" '{print $2}' | awk '{print $2}' | sed '/^$/d' | sed 's/\?.*//g' | sort | uniq -c | sort -rn > url_hits.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment