From: Curt Sampson Date: 2002-08-01T22:01:09+09:00 Subject: Re: A very basic tail -f implementation On Thu, 1 Aug 2002, James F.Hranicky wrote: > On Thu, 1 Aug 2002 21:23:09 +0900 > "Berger, Daniel" wrote: > > > > - Check for rotation by checking for changes in the inode number > ... > That's true, you just have to stat the actual filename everytime and > check against the current filehandle. Right. You also ought to check the device number, in case the file is somewhow moved to another device and ends up with the same inode number. At least, that's what I did when I added the '-F' option to tail(1) in NetBSD. Maybe I'm just anal-retentive. :-) Also, you might want to check to see if the file has been shortened, in case the writer truncates it and starts writing again at the beginning. cjs -- Curt Sampson +81 90 7737 2974 http://www.netbsd.org Don't you know, in this new Dark Age, we're all light. --XTC