Sunday, February 24, 2008

Counting Unique IPs in Apache Log Files

A little Unix one-liner, posted to my online memory bank:

cat /var/apache/logs/access_log | grep whatever | cut -f1 -d' ' | sort -n | uniq | wc

Change "whatever" to the name of the relative path you are trying to count.

No comments: