Re: FN-FORUM: Tracking MP3 downloads
date posted 1st March 2004 15:06
On Monday 01 Mar 2004 3:19 pm, Paul J White wrote:
> Dom wrote:
> > "grep filename.mp3 /var/log/httpd/access_log | wc --lines"
>
> That may be simple to you mate, but it may as well be Chinese to me ;-)
It's not that hard, honest. As Simon says, grep looks for instanc=
es=20
of "filename.mp3" in the log file, and returns each line that contains it=
=2E
The "|" character means "take the output of the last command and make it=20
the input of the next one". (Near enough, for any Unix pedants out there=
).
"wc" is an abbreviation of "word count"; "--lines" is an option to say=20
"give me the number of lines, not words".
> Thanks to all for your thoughts anyway - the raw logs are something of
> a nightmare to a non techie like me, but I've a few things to look at.
The awstats package may be more appropriate in any case.