linux awk,sort,uniq,head 鍒嗘瀽apache鏃ュ織鏂囦欢

sort 鎺掑簭

uniq 蹇界暐鏂囦欢閲嶅琛

head

grep " 404 " access.log | cut -d ' ' -f 7 | sort | uniq -c | sort -nr
#404鎶ラ敊椤甸潰

awk '{print 9}' access.log | sort | uniq -c | sort
鍚勪釜鐘舵佺偣鍑绘鏁

cat access.log | awk '{ print1 ; }' | sort | uniq -c | sort -n -r | head -n 10
鍓嶅崄涓猧p

cat access.log  | awk ' { total[9] +=10 } END {  for (x in total) { printf "Status code %3d : %9.2f Kbn", x, total[x]/1024 } } '
鍚勪釜鐘舵佺殑鏁版嵁浼犺緭閲 kb

cat access.log | awk '{ print 17 }' | sort | uniq -c | sort -rn | head -n 25
鏌ョ湅璁块棶鏈澶氱殑椤甸潰鍜宨p

All posts

Other pages

鍙戣〃鍥炲

鎮ㄧ殑鐢靛瓙閭鍦板潃涓嶄細琚叕寮銆 蹇呭~椤瑰凡鐢*鏍囨敞