UNIX/Redhat

uniq -c 통해서 추출하는거 같은데 몰 하는지 몰겠당ㅋㅋㅋㅋㅋ

99iberty 2013. 7. 29. 11:30

 

 

http://rocksea.tistory.com/184

 

 

access log 접속아이피 분석 shellscript

nginx에 접속한 IP 및 횟수를 알고싶을때 사용하면 된다.

$ tail -n 500000 access.log | awk '{print $1" "$4}' | uniq -c | sed -e 's/^\s*//g' | sort -n > total.log


uniq -c 라는 명령어 참 유용한것 같다.