[ale] Viewing huge log files efficiently

Geoffrey esoteric at 3times25.net
Fri May 30 18:48:01 EDT 2003


Jason Day wrote:
> On Fri, May 30, 2003 at 04:45:31PM -0400, John Wells wrote:
> 
>>Ok, so now I have a 132 mb log file that's been gziped up.  What's the
>>most efficient way of getting, say, the last 1000 lines or so?  I thought
>>about:
>>
>>tail -1000 $(zcat out.gz)
>>
>>But that would first cat it out and consume, imo, massive amounts of
>>memory and swap.  What's the better way?
> 
> 
> I would use zless.  I haven't examined how efficient (memory- and
> swap-wise) it is, but less is generally pretty good about using memory.

Hmm, I'd suspect it's still going to have to decompress the whole thing, 
but that's based on my complete lack of knowledge as to how gzip works. :(

> 
> HTH,
> Jason

-- 
Until later: Geoffrey		esoteric at 3times25.net

The latest, most widespread virus?  Microsoft end user agreement.
Think about it...

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list