Finding Unique Web Visitors

I use this commandline to determine how many unique IP addresses visit my websites.  It isn't completely accurate because many visit from behind NAT firewalls and also I'm not checking between certain hours, etc …  This is just for fun:

$ cat /var/log/apache2/access.log | sed -e 's/:/ /g' | awk '{print $1}' | sort | uniq | wc -l

This entry was posted in CLI HOWTOs, HOWTOs. Bookmark the permalink.