Re: Read file backwards

From: Date: Sat, 10 Apr 2004 16:22:49 +0000
Subject: Re: Read file backwards
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-183073@lists.php.net to get a copy of this message
Got a tip by email, Might look here and modify it if needed ... http://tailforwin32.sourceforge.net/ Thanks, this is atleast much better than switching windows and refershing the files in Textpad which I do at the moment. tail was ofcourse the word I was looking for, not the trace word. Thanks for the tip, Kim Steinhaug "Kim Steinhaug" <kim@steinhaug.com> wrote in message news:20040410155401.76430.qmail@pb1.pair.com... > Anyone have a script that reads a file backwards? Im looking for > a way to trace a log file, say the last 30 lines each time I run the script. > I havnt found any DOS tools so I guess doing it in PHP will be just as > fine, and Im on a Win32 platform. > > I could however read the entire file, and count the files and show the > last lines, but this wouldnt really read it backwards and would work > very "foolishly" on large files I would think. > > If there isnt a way of doing this Ill have to do the above, but you never > know. Ill google in the meantime. > > -- > -- > Kim Steinhaug > ---------------------------------------------------------------------- > There are 10 types of people when it comes to binary numbers: > those who understand them, and those who don't. > ---------------------------------------------------------------------- > www.steinhaug.com - www.easywebshop.no - www.webkitpro.com > ----------------------------------------------------------------------

« previous php.general (#183073) next »