用shell统计ip访问情况,要求分析访问日志,找出访问页面数量在前10位的ip数。

请问一下,用shell统计ip访问情况,要求分析访问日志,找出访问页面数量在前10位的ip数。
最新回答
沿途有你

2026-04-16 10:07:49

如果是nginx的话
awk '{print $1}' access.log |sort|uniq -c |head -n 10
我历史不好别跟我提以往

2026-04-23 10:45:35

grep -i -o -E '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}' log.file | sort | uniq -c | sort -r
收起 1条折叠回答