– 查找关键字,固定标识符后的字符去重后打印出来
cat /nginx/nginx-1.20.1/logs/access.log |grep ‘abc’ |awk -F’:’ ‘{print $7}’|sort |uniq -c |sort -rn
–查找关键字 最后10行的数据
cat /nginx/nginx-1.20.1/logs/access.log |grep -n ‘abc’ |tail -n 10
–查找关键字并展示
cat -n /app/tomcat/log/* | grep -10 ‘abc’ --color
–查看系统关键指标
lscpu;free -g;df -h;cat /etc/system-release