🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.perl.misc
Article #248

reverse file reading

#248
From: pvr
Date: Wed, 04 Oct 1995 00:00
13 lines
1408 bytes
Hi,
is there an easy way to read a file in reverse order (like tail -x does).
My problem is that I just need the file contents starting at a pattern
very near the end of a really long file (yes, it's an access_log :-)     
and I was wondering if it wouldn't be possible to begin at the end of the
file to speed up my prog.                                           
Regarding how quick "tail -1 access_log" is I can't believe this         
scans the whole file. So, is there a perl solution, too ?

If you have any reply, please send me an E-mail, cause our news server
deletes the files rather quick (at least quicker than I read them :-(.

Thanks.
Technical Details
Message-ID: <44spkk$ipv@rs3.rz.uni-hohenheim.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1043e7,54d2c575875f4961,start
X-Google-Attributes: gid1043e7,public
X-Google-Thread: 1133f4,54d2c575875f4961,start
X-Google-Attributes: gid1133f4,public
X-Google-Thread: fa0ae,54d2c575875f4961,start
X-Google-Attributes: gidfa0ae,public
From: pvr <pvr>
Subject: reverse file reading
Date: 1995/10/04
Message-ID: <44spkk$ipv@rs3.rz.uni-hohenheim.de>
X-Deja-AN: 116964439
content-type: text/plain; charset=us-ascii
organization: Fraunhofer Inst. for Computer Graphics, Darmstadt, Germany
x-url: news://news.uni-hohenheim.de/comp.lang.perl.misc
mime-version: 1.0
newsgroups: comp.lang.perl.misc,fj.lang.perl,de.comp.lang.perl
x-mailer: Mozilla 1.12 (X11; I; IRIX 5.2 IP22)