使用Shell分析Nginx Access日志:
找出访问最多的前50个页面 cat site.log | grep "18/Jul/2013" | grep -v "/wp-content" |grep -v "/wp-includes"|grep "html" |awk '{print $7}' | sort | uniq -c | sort -nr | head -n 50 找出访问最频繁的时段 awk '{print $4}' site.log | grep "18/Jul/2013" |cut -c 14-18|sort|uniq -c|sort -nr|head
Comment