Created
November 10, 2014 19:43
-
-
Save mwinters0/c70d195c5c5670d1625f to your computer and use it in GitHub Desktop.
Shell one-liner to parse apache access logs and extract a unique URL list with hit count, querystring excluded.
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
cat access.log | awk -F\" '{print $2}' | awk '{print $2}' | sed '/^$/d' | sed 's/\?.*//g' | sort | uniq -c | sort -rn > url_hits.txt |
best one-line-script ever
Very helpful. Thanks a lot.
Thanks, this helped a lot!
Thanks, very useful
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thankss! Just what i need to find a rogue php in my wordpress folder :P