EnderUNIX Team.


EnderUNIX tips

Mail to My Friend , Home Page

[ General ]

"WHO HITS MY WEBSITE" - ülkü SAYILAN - (2003-12-10 06:16:28)   [3702]

WHO HITS MY WEBSITE

This will generate a listing of
all IPs that have accessed a specific
directory of my website
(the /foo/ directory), and print
a count (from greatest to least)
next to the IP.

if you want to get a total listing
for all directories of a domain, just
omit the "grep -e /foo/" statement.

cat /home/server.com/logs/access_log |
grep -e /flesh/ |
sort |
uniq -w15 -c |
cut -f 1 -d- |
sort -r -g


Using this format for the apache log files:
63.26.57.218 - - [07/Mar/2001:21:12:15 -0500] "GET
/flesh/fleshpix/thumbs/facial2/poofylips.jpg_t.jpg HTTP/1.1" 200 4353


Sample output is:
123 62.155.255.18
123 216.17.9.140
121 62.98.129.125
120 66.32.16.55
120 216.196.144.202
119 194.100.2.65
116 194.170.1.68
114 62.155.255.21


Mail to My Friend , Home Page