That worked great: grep " http://www.website.net" access.log | tr -s ' ' |
cut -d' ' -f3 | sort
-n | uniq > /filename
What is the best way to add to this a number next to each IP of the amount
of times a particular site was contacted, and the date of last contact?
Jim Brouse
Internet Administrator
Information Technology Department
Pascua Yaqui Tribe of Arizona
Phone: 520-879-5813
E-mail: jbrouse@pascuayaqui-nsn.gov
Antony Stone
<Antony@Soft-Soluti To: squid-users@squid-cache.org
ons.co.uk> cc:
Subject: Re: [squid-users] Squid Activity/Usage and Reporting Tools
07/31/2003 02:43 PM
On Thursday 31 July 2003 10:16 pm, Jim_Brouse/PYT@PASCUAYAQUITRIBE.ORG
wrote:
> I tried the below script although it did give back a file it only had
one
> entry in it. What I am interested in is all IP addresses that visited a
> particular domains site and subdomains of that site.
Try a simpler version:
grep -c " http://www.website.net" access.log
will tell you how many accesses there were to the site
grep " http://www.website.net" access.log | tr -s ' ' | cut -d' ' -f3
will give you a list of the IPs that visited it
If you want a list showing each IP only once, no matter how many visits it
made:
grep " http://www.website.net" access.log | tr -s ' ' | cut -d' ' -f3 |
sort
-n | uniq
Antony.
-- How I want a drink, alcoholic of course, after the heavy chapters involving quantum mechanics. - 3.14159265358979Received on Fri Aug 01 2003 - 09:56:22 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:18:32 MST