linux 日志分析 命令grep、awk、sort、uniq
查看日志去除重复
cat catalina.out |grep "xxxxx"|awk -F ']' '{print $2}'|sort|uniq
统计去除重复的行数
cat catalina.out |grep "xxxxx"|awk -F ']' '{print $2}'|sort|uniq|wc -l
查询日志大于某一个时间点的日志,并且去重复
cat catalina.out | grep "xxxxxxxx"|awk '($0>"05-19 18:20:00"){print $0}'|awk -F ']' '{print $2}'|sort|uniq
统计行数
cat catalina.out | grep "xxxxxxxx"|awk '($0>"05-19 18:20:00"){print $0}'|awk -F ']' '{print $2}'|sort|uniq|wc -l
相关推荐
chenchuang 2020-01-25
jiangtie 2020-01-17
fendou00sd 2020-01-07
AshaLv 2015-01-11
daidaizhuzhu 2013-01-05
傻小烨 2012-05-22
lfjjia 2011-06-17
leeknives 2013-04-10
ztyzly00 2020-07-18
killgod 2020-06-14
小惠 2020-06-05
Oudasheng 2020-06-04
从零开始 2020-06-05
litterfrog 2020-05-30
老谢的自留地 2020-05-09
wulaxiaohei 2020-05-05
cyyking 2020-05-03
aaLiweipeng 2020-04-15