[ale] Viewing huge log files efficiently

Jason Day jasonday at worldnet.att.net
Fri May 30 17:27:41 EDT 2003


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.

HTH,
Jason
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list