Tools to break apart large log files.

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Dec 10 20:06:23 UTC 2009


On Wed, Dec 09, 2009 at 10:22:37PM -0500, Scott Sullivan wrote:
> The log files have a time stamp at the front of each line, like this:
>
> [2009/12/09 19:10]  UserA: Text
> [2009/12/09 19:11]  UserB: Responce
> [2009/12/09 19:11]  UserB: More Text
> [2009/12/09 19:11]  UserA: ??? Profit
>
> I want something that will register when the gap between the time stamps  
> is greater then a given value and split them out to separate files.

Sounds like a job for perl.

Of course given the standard 'mark' that syslog tends to do (great idea
too), there probably won't ever be 2 hours between messages.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list