Skip to content

Instantly share code, notes, and snippets.

@hfknight
Last active August 29, 2015 13:57
Show Gist options
  • Save hfknight/9814504 to your computer and use it in GitHub Desktop.
Save hfknight/9814504 to your computer and use it in GitHub Desktop.
Apache Access Log Unique Request Statistics
cat *.txt |grep "YOUR_FILTER"|grep -vi "EXCLUDE_FILTER"|cut -d\" -f2|awk '{print$2}'|sort|uniq -c|sort -nr > report.log
Example:
cat report.log | grep -vi ".css\|.js\|.woff\|.eot\|.ttf\|.jpg\|.gif\|.png\|.ico" |grep -vi "wp-login.php\|wp-cron.php\|wp-admin\|robots.txt" | cut -d\" -f2|awk '{print$2}'|sort|uniq -c|sort -nr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment