Created
October 29, 2013 03:37
-
-
Save itomg/7208846 to your computer and use it in GitHub Desktop.
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
#分析日志中的UserAgent | |
cat access_20130704.log | awk -F "\"" '{print $(NF-3)}' | sort | uniq -c | sort -nr | head -20 | |
#上面的脚本将分析出日志文件中最多的20个UserAgent | |
#分析日志中那些IP访问最多 | |
cat access_20130704.log | awk '{print $1}' | sort | uniq -c | sort -nr | head -20 | |
#分析日志中那些Url请求访问次数最多 | |
cat access_20130704.log | awk -F "\"" '{print $(NF-5)}' | sort | uniq -c | sort -nr | head -20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment