标签:net span gre div grep port style back php
awk ‘{print $1}‘ access.log | sort -n | uniq | wc -l
grep "07/Apr/2017:0[4-5]" access.log | awk ‘{print $1}‘ | sort | uniq -c| sort -nr | wc -l
awk ‘{print $1}‘ access.log | sort -n |uniq -c | sort -rn | head -n 100
awk ‘{print $1}‘ access.log | sort -n |uniq -c |awk ‘{if($1 >100) print $0}‘|sort -rn
grep ‘127.0.01‘ access.log |awk ‘{print $7}‘|sort |uniq -c |sort -rn |head -n 100
awk ‘{print $7}‘ access.log | sort |uniq -c | sort -rn | head -n 100
grep -v ".php" access.log | awk ‘{print $7}‘ | sort |uniq -c | sort -rn | head -n 100
cat access.log | cut -d ‘ ‘ -f 7 | sort |uniq -c | awk ‘{if ($1 > 100) print $0}‘ | less
tail -1000 access.log |awk ‘{print $7}‘|sort|uniq -c|sort -nr|less
awk ‘{print $4}‘ access.log |cut -c 14-21|sort|uniq -c|sort -nr|head -n 100
awk ‘{print $4}‘ access.log |cut -c 14-18|sort|uniq -c|sort -nr|head -n 100
awk ‘{print $4}‘ access.log |cut -c 14-15|sort|uniq -c|sort -nr|head -n 100
*在nginx log中最后一个字段加入$request_time
cat access.log|awk ‘($NF > 3){print $7}‘|sort -n|uniq -c|sort -nr|head -20
cat access.log|awk ‘($NF > 1 && $7~/\.php/){print $7}‘|sort -n|uniq -c|sort -nr|head -100
grep ‘Baiduspider‘ access.log |wc -l
grep ‘Baiduspider‘ access.log |grep ‘404‘ | wc -l
netstat -tan | grep "ESTABLISHED" | grep ":80" | wc -l
tcpdump -i eth0 -tnn dst port 80 -c 1000 | awk -F"." ‘{print $1"."$2"."$3"."$4}‘ | sort | uniq -c | sort -nr
标签:net span gre div grep port style back php
原文地址:https://www.cnblogs.com/wangchaolinux/p/9404253.html