This is a discussion on Edit Transferlog within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi all, My site did some pretty good traffic in 2004. I'm trying to cut apart the 2004 entries ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
My site did some pretty good traffic in 2004. I'm trying to cut apart the 2004 entries from the 2005 entries in my transferlog file. However, the file is relatively large, over 400 MB, over 4.2 million lines. I've tried loading the file in KWrite on my Linux box and it literally works opening it for hours, and navigating it is quite painful. Does anyone know a script I could run it through to simply cut out the 2004 entries (bash? perl?)? I'd appreciate any help.. Matt Fuerst |
|
|||
|
*** Davide Bianchi escribió/wrote (31 Jan 2005 14:41:37 GMT):
> Do an 'head yourtransferlogfile' and see what's the format of the date, > then run grep on it and get only the data you need. Afterwards, I suggest you install logrotate to split your new logs. -- -+ Álvaro G. Vicario - Burgos, Spain +- http://www.demogracia.com (la web de humor barnizada para la intemperie) ++ Manda tus dudas al grupo, no a mi buzón -+ Send your questions to the group, not to my mailbox -- |
|
|||
|
Search the web from a program called chronosplit. From the cronolog
website: cronosplit is a simple program that reads lines from a set of input log files, which must be in Common Log Format and write each lines to an output files, the name of which is constructed using the template speci- fied and timestamp from the the line. The template uses the same format specifiers as the Unix date(1) command (which are the same as the standard C strftime library function). I use a companion application called cronolog which does the same thing as logrotate but has more options (since you provide a date mask rather than a size.) I have not personally used cronosplit since the .exe is not in the windows version of the software. (And the text editor that I use, TextPad from Helios, software doesn't have any problem with LARGE files.) I think that cronolog is based on another program called splitlog but I cant be sure. you may wish to google for tht as well. --Brian K. White "Alvaro G. Vicario" <kAlvaroNOSPAMTHANKS@terra.es> wrote in message news:17qo0msgiexmm$.alaf86823dv$.dlg@40tude.net... > *** Davide Bianchi escribió/wrote (31 Jan 2005 14:41:37 GMT): > > Do an 'head yourtransferlogfile' and see what's the format of the date, > > then run grep on it and get only the data you need. > > Afterwards, I suggest you install logrotate to split your new logs. > > > -- > -+ Álvaro G. Vicario - Burgos, Spain > +- http://www.demogracia.com (la web de humor barnizada para la intemperie) > ++ Manda tus dudas al grupo, no a mi buzón > -+ Send your questions to the group, not to my mailbox > -- |