1、找出nginx访问请求最多的ip
cat /opt/logs/nginx/access.log | awk '{print $1}' | sort | uniq -c |sort -rn | more
2、打印每个请求的状态码
cat /opt/logs/nginx/access.log | awk '{pring $9}'
cat /opt/logs/nginx/access.log | grep -ioE "HTTP\/1\.[1|0]\"[[:blank:]][0-9]{3}
1、找出nginx访问请求最多的ip
cat /opt/logs/nginx/access.log | awk '{print $1}' | sort | uniq -c |sort -rn | more
2、打印每个请求的状态码
cat /opt/logs/nginx/access.log | awk '{pring $9}'
cat /opt/logs/nginx/access.log | grep -ioE "HTTP\/1\.[1|0]\"[[:blank:]][0-9]{3}