List Distinct IPs on Your Apache Access Log

On January 6, 2010, in Apache, Bash, Linux, Unix, by Code Monk

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.

Tagged with:  

Leave a Reply