RE: Emulate "tail -f" on file




Thanks all for your input. The File::Tail package works although it
seems to stop working once I restart the application writing to the
logfile. I've played around with the settings but I'll have to take it
up with the author.

Thanks again!

-----Original Message-----
From: Chris Knipe [mailto:savage@xxxxxxxxxxxxx]
Sent: 19 May 2005 09:48 AM
To: Ramprasad A Padmanabhan
Cc: beginners@xxxxxxxx
Subject: Re: Emulate "tail -f" on file

On Thu, May 19, 2005 at 11:54:35AM +0530, Ramprasad A Padmanabhan
wrote:
> use File::Tail;
>
>
> On Thu, 2005-05-19 at 11:37, Tielman Koekemoer (TNE) wrote:
> > Hi All,
> >
> > If I wanted to monitor a file in a way that would emulate "tail
-f"
> > (in the shell), how would I open the file?
> >
> > open(FILE, " filename |"); (?)
> >
> > TIA


As someone who asked the -EXACT- same question, not even a month ago,
I can really suggest the archives, and I can also really second
File::Tail - it's a BRILLIANT module.

--
Chris.


--
To unsubscribe, e-mail: beginners-unsubscribe@xxxxxxxx For additional
commands, e-mail: beginners-help@xxxxxxxx <http://learn.perl.org/>
<http://learn.perl.org/first-response>


.



Relevant Pages

  • Re: Atomic log switch?
    ... > something like changing the inode a filename refers to in a single ... of the fileits writing to. ... # this script writes what it gets from the standard input to the logfile specified ... # current filedescriptor and opens the file again. ...
    (comp.unix.solaris)
  • Re: Server Pac Download Errors
    ... the documentation but restart processes seem a little light. ... GIM47601I PACKAGE OS191348.content WAS PARTIALLY STAGED TO THE SMPNTS. ... Connection to server interrupted or timed out. ... Restarting RECEIVE FROMNETWORK ...
    (bit.listserv.ibm-main)
  • [PATCH 1/25] NTFS: Support more clean journal ($LogFile) states.
    ... Support more clean journal ($LogFile) states. ... * Check the restart page @rp for consistency and return TRUE if it is ... +extern BOOL ntfs_check_logfile(struct inode *log_vi, ...
    (Linux-Kernel)
  • XML support in Java 5?
    ... The javax.xml and javax.xml.stream packages have some classes that look very useful for writing and reading XML. ... The few things that are documented as being in Java 5, I don't see how they are useful for actually writing XML. ...
    (comp.lang.java.programmer)
  • Re: XMLPropWorks
    ... It's been a month since I let a dozen people or so beta test it. ... In the past I had written various VB routines for managing my custom ... major functionality that I wanted which wasn't in the package. ... or writing to the database. ...
    (comp.cad.solidworks)