본문으로 바로가기
반응형



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 


반응형

'서버 & 시스템 > Linux' 카테고리의 다른 글

Centos6에서 glibc 2.4 설치하기  (1) 2021.04.14
CentOS DVD, Everything, Minimal ISO 차이  (0) 2020.11.12
.htpasswd 에서 특수문자 이용하기  (0) 2020.09.07
Imagick ImageMagick 설치  (0) 2020.08.26
Roundcube Mail 설치  (0) 2020.08.26