节选

1.要求分析Apache访问日志,找出里面数量在前面100位的ip数.日志大约在78M左右.一下是apache日志文件

  节选(其中日志access.log):

        218.107.27.137 .....

        202.112.32.22 ....[26/Mar/2006:23:59:55 +0800].......

   shell程序如下:

cat access.log|awk '{print $1}'|sort -n|uniq -c|sort -nr|head -100

原文地址:https://www.cnblogs.com/hanxing/p/4225888.html