Register
It is currently Fri Jul 25, 2014 2:58 am

Parsing access logs


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Thu Jun 28, 2007 10:12 am   

Joined: Thu Sep 07, 2006 3:56 pm
Posts: 8
Location: Toronto, Canada
Hello,

I'm trying to determine how many flash video files I served in a given month. I need to detect the following pattern:

[28/Jun/2007:03:21:25 -0700] "GET /flv/377.flv"

The files are always stored in the "flv" directory, and the filenames are always numeric. The file numbers are at least 1 digit in length (ex "7.flv"), and can be up to 4 digits in length (ex "1345.flv").

Is there a simple script that can determine, for example, how many flvs I served in June?

Cheers,

Neal


Top
 Profile WWW  
 PostPosted: Thu Jun 28, 2007 7:17 pm   
Site Admin
User avatar

Joined: Sun May 15, 2005 9:36 pm
Posts: 662
Location: Des Moines, Iowa
Code:
grep -c "GET*.flv" /path/to/log/file


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP