Skip to content

Instantly share code, notes, and snippets.

@jmpcyc
Created October 31, 2014 06:28
Show Gist options
  • Select an option

  • Save jmpcyc/438aa984592f9fb0a13c to your computer and use it in GitHub Desktop.

Select an option

Save jmpcyc/438aa984592f9fb0a13c to your computer and use it in GitHub Desktop.
Linux运维相关命令
查看总的访问次数
cat itv-update.openspeech.cn.access.log | wc -l
查看访问的ip总数
cat itv-update.openspeech.cn.access.log | aw '{a[$1]+=1;}END{for(i in a){print i " >> "a[i];}}' | wc -l
按访问量大小排序所有的访问ip,并且答应出具体的ip 和访问次数
cat itv-update.openspeech.cn.access.log | awk '{a[$1]+=1;}END{for(i in a){print i " >> "a[i];}}' | sort -nr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment