info home Info Homegeneral Generalwindows Windowsunix linux Linux/Unixdebian Debianmac os Mac OSapache Apachenginx Nginxiphone iPhone/iPod Touch

Tags

Parsing Web Server Logs

Assuming your webserver log is access.log

Extract unique IP addresses from the webserver log

cat access.log | awk '{print $1}' | uniq

Count number of unique IP addresses from log

cat access.log | awk '{print $1}' | uniq | wc -l

List the IP addresses of users using iphones

cat access.log | grep -i iphone | awk '{print $1}' | uniq | sort

Last Updated on 1 June 2009

If you liked this article, subscribe to our Feed, follow us on Twitter (@aruljohn) and/or join our Facebook Page.