cat nginx.log | awk '{print $8,$10}' | awk 'BEGIN{count[$1]=0}($2!=200){count[$1]+=1}END{for(i in count) print(i, count[i])}'

输出:

/hello.html 1
/favicon.ico 559
/hello2.html 11

 

Logo

更多推荐