info home general windows unix linux debian mac os apache nginx iphone

Recent Articles

How to rename multiple files in Unix or Linux

Convert docx to doc in Mac OS X Snow Leopard or Leopard

HISTORY shell variable management in Unix/Linux

How to eject CD/DVD from your MacBook or iMac

Play Prince of Persia on Ubuntu Linux using DOSBox

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 Update: June 2009