Forum: Ruby Re: ruby tail

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
555c1193071e97926fa67c038244c047?d=identicon&s=25 Phy Prabab (Guest)
on 2007-02-22 10:39
(Received via mailing list)
The issue there is that how do I detect new output and then capture that
output as in tail -f <file>?

----- Original Message ----
From: Kevin Jackson <>
To: ruby-talk ML <>
Sent: Thursday, February 22, 2007 1:33:19 AM
Subject: Re: ruby tail

> Is there a gem or perhaps a method I am not aware of that does the similar function of 
tail?  Or is there a way to use tail in ruby?   I have a file that I want to process as 
new data is appended to the file.  This is easy enough using tail and tail has the added 
advantage that it can follow a file if it is "rolled".

Just call out to tail

def tail(f)
  `tail f`

or similar - if tail does what you want, use it

This topic is locked and can not be replied to.