用shell分析nginx日志百度网页蜘蛛列表页来访情况
2014-12-17 11:19
232 查看
#!/bin/bash #desc: this scripts for baidunews-spider #date:2014.02.25 #testd in CentOS 5.9 x86_64 #saved in /usr/local/bin/baidu-web.sh #written by coralzd@gmail.com www.zjyxh.com dt=`date -d "yesterday" +%m%d` if [ $1x != x ] ;then if [ -e $1 ] ;then grep -i "Baiduspider/2.0" $1 > baiduspider-${dt}.txt num=`cat baiduspider-${dt}.txt|wc -l` echo "baiduspider number is ${num},file is baidu-${dt}.txt" cat baiduspider-${dt}.txt|awk '{print $7}'|sort |uniq -c|sort -r >`ls ${1}|cut -c 1-10`-${dt}.txt echo "$1 was done" else echo "$1 not exsist!" fi else echo "usage: $0 file_path" fi本次用shell分析百度网页蜘蛛跟百度新闻蜘蛛一个方法,无非就是把关键词由baiduspider-news换为baiduspider/2.0。
相关文章推荐
- Nginx 0.8.5版本access.log日志分析shell命令
- nginx日志分析shell脚本
- shell脚本分析nginx日志
- shell脚本分析 nginx日志访问次数最多及最耗时的页面(慢查询)
- shell脚本分析 nginx日志访问次数最多及最耗时的页面(慢查询)
- GoAccess分析多个nginx日志文件,了解访问的情况
- Nginx access.log日志分析shell命令
- shell脚本分析 nginx日志访问次数最多及最耗时的页面
- Nginx access.log日志分析shell命令
- shell版Nginx日志蜘蛛爬取查看脚本
- shell 脚本分析nginx 访问日志状态码
- shell分析nginx日志
- shell脚本分析 nginx日志访问次数最多及最耗时的页面(慢查询)
- shell 分析 nginx 日志统计
- nginx简单的日志shell分析统计脚本
- Nginx服务整理 日志分析(shell+python)
- shell分析nginx access log日志
- shell 脚本分析Nginx 日志
- shell版Nginx日志蜘蛛爬取查看脚本
- shell脚本分析 nginx日志访问次数最多及最耗时的页面(慢查询)