Oliver Nassar

Access Logs: Getting unique pages and frequency

June 04, 2011

I ran the following which gave me all successful requests, sorted, uniqued, and then sorted according to their frequency. I then had it outputted to a file.

cat site.log | awk '{ if($9 == 200) { print $7 } }' | sort | uniq -c | sort -r > stats.log

Hope this helps.