Linux 分析日志(各个IP访问次数)
前言
本案例用于分析日志,用于获取各个 IP 访问服务器的次数。
案例日志文件
案例日志文件下载: 下载
完整命令行案例
1 | awk '{print $1}' access.log |sort |uniq -c|sort -nr|head -n 20 |
命令逐步分析
1 | 1. 使用 awk 分析 IP 地址 |
本案例用于分析日志,用于获取各个 IP 访问服务器的次数。
案例日志文件下载: 下载
1 | awk '{print $1}' access.log |sort |uniq -c|sort -nr|head -n 20 |
1 | 1. 使用 awk 分析 IP 地址 |
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true