标签:access_log
cat bbs.access.2014-05-01.log | awk ‘{print $1}‘ | sort -n | uniq -c | sort -n | tac | head -n 10
cat bbs.access.2014-05-01.log | awk ‘{print $1}‘ | sort -n | uniq -c | sort -n | tail -n 10
cat bbs.access.2014-05-01.log | awk ‘{print $9}‘ | sort -n | uniq -c
[root@mode ~]# awk ‘{print $1}‘ access_2010-12-8.log| sort -n | uniq -c |sort -nr -k1
9 59.33.26.105
8 124.115.4.18
3 123.122.65.226
[root@mode ~]# awk ‘{print $1}‘ access_2010-12-8.log| sort -n | uniq -c |sort -n|tac
9 59.33.26.105
8 124.115.4.18
3 123.122.65.226
NAME
tac - concatenate and print files in reverse #在反向连接和打印文件
-r, --regex
interpret the separator as a regular expression #解释分离器作为一个正则表达式
本文出自 “Try to be brave” 博客,谢绝转载!
标签:access_log
原文地址:http://0487561.blog.51cto.com/7160047/1590734