学习资料
- 高级Bash脚本编程指南
- LINUX与UNIX SHELL编程指南
- 鸟哥的Linux私房菜
- IBM DeveloperWorks
- 阮一峰的《bash脚本教程》
- Google
实战内容
- 日志数据检索
-
find_error_log
编写一个函数 find_error_log()
1.找出log中的404 500的报错 个数考察严谨性
- awk ‘$9~/404|500/{print $9}‘ nginx.log |sort|uniq -c
.2.找出500错误时候的上下文 考察grep高级用法
- grep -C 2 ‘ 500 ‘ nginx.log
- 日志数据统计
- 找出访问量最高的ip top10统计分析
- awk ‘{print $1}‘ nginx.log|sort -nr|uniq -c|sort -nr|head -10
- 数据文件修改
三剑客实战Nginx日志分析
原文:https://www.cnblogs.com/zwldyt/p/13022238.html