Skip to content

Instantly share code, notes, and snippets.

Last active May 11, 2016 20:51
What would you like to do?
awk '{print $7}' access.log | # Split by whitespace, 7th field is request path
sort | # Make occurrences of the same URL appear consecutively in file
uniq -c | # Replace consecutive occurrences of the same URL with a count
sort -rn | # Sort by number of occurrences, descending
head -n 5 # Output top 5 URLs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment