在 NGINX 访问日志(默认日志格式)中,我将使用哪些命令来过滤所有 GET 请求的日志,然后对所有 HTTP 响应状态代码以及每个状态的总数进行唯一排序?
由于某些日志格式,它可能会有所不同:
cat /var/log/nginx/access.log.1 | grep "GET" | awk '{print $9}' | sort | uniq -c
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.