Run below command to list the number of hits per IP address from access log:
cat access.log | awk '{print $1}' | sort -n | uniq -c | sort -nr
The command below will provide the top 50 Hits sorted by IP address:
cat access.log | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -50
The command below will list the unique IP address accessing the system:
awk '{print $1}' access.log|sort -u
Leave a Reply