반응형
1. 접근 IP 모두 출력하기 (접근 수 낮은순부터 출력)
# cat /var/log/httpd/access_log* | awk '{print $1}' |sort |uniq -c |sort |
... 생략 ...
2. 접근 적게한 IP 10개 출력
# cat /var/log/httpd/access_log* | awk '{print $1}' |sort |uniq -c |sort -nr |tail -n 10 |
3. 접근 많이한 IP 10개 출력
# cat /var/log/httpd/access_log* | awk '{print $1}' |sort |uniq -c |sort -nr |head -n 10 |
4. 가장 많이 접속한 IP 만 출력
# cat /var/log/httpd/access_log* | awk '{print $1}' |sort |uniq -c |sort -nr |head -n 1 |cut -d ' ' -f6 |
반응형