Apache

List Distinct IPs on Your Apache Access Log

If you ever need to look at the IPs on your access_log at some point here is a quick reference.

cat access_log|awk '{print $1}'|sort|uniq -c

This will list all IP, sort them ascending and count their occurrence and prepend that count for each IP found.

Tags: , , , ,

Wednesday, January 6th, 2010 Apache, Bash, Linux, Unix No Comments