[Gllug] Apache log files
John Hearns
hearnsj at googlemail.com
Tue Apr 7 10:19:05 UTC 2009
2009/4/7 william pink <will.pink at gmail.com>:
> Hi,
>
> I have the rather horrible task of splitting up lots (40Gb's worth) of
> Apache log files by date, the last time I did this I found the line number I
> then tailed the file and outputted it into a new file which was a long
> arduous task. I imagine this can be done in a few minutes with some
> Regex/Sed/AwkBash trickery but I wouldn't know where to start can anyone
> give me any pointers to get started?
I would think of Perl for this task - that's what the language is good at.
However, I do sometimes have a problem of a certian application
producing huge output files.
I deal with this using the 'csplit' utility.
Man csplit, and think hard about the regexp PATTERN which will match
your date ranges.
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list