From: Erik Hollensbe Date: 2008-08-25T22:56:20+09:00 Subject: Re: Open file, get first line, delete first line close file Rob Biedenharn wrote: > I had some Perl code (lifted from some forum or article) that would > cut initial lines out of a log file using sysread/syswrite with a > truncate to reset the end-of-file. I don't recall if it used a single > file descriptor or two separate ones, but the idea is the same -- move > bytes "backward" across the gap that you want to eliminate. I agree > with your "worst possible scenario for I/O" assessment. You are talking about `tail -f`. This is different. (And if you ever need to find that again, perldoc -q tail). -Erik -- Posted via http://www.ruby-forum.com/.