Re: strange disk activity [tail -f]

Kevin M Bealer (
Tue, 2 Apr 1996 00:40:28 -0500 (EST)

On Mon, 1 Apr 1996, Zefram wrote:

> >yep, "tail -f" reads (polls) the file every second, this in turn changes
> >the atime field, and bdflush updates the inode and the superblock.
> There's a voice in my head saying "that should happen on open(2), not
> read(2)". Am I just hallucinating? More to the point, why do we get
> this repeated (and annoying) disk activity under 1.3.~80 but not
> 1.2.x? Can the new bdflush be tuned to wait longer before flushing,
> and if so, how?
> >might be a stupid question, but is there no way doing event based reads
> >on files [selects and/or blocking reads at the end of the file] ?
> Not under Unix.
> -zefram

But couldn't you kludge it by

(use a script of course but pseudo C is easy to read :)

while(mod_date(/tmp/tempfile) < mod_date(/file/in/question))

Or was the goal more frequent updates?

To A Quick Young Fox:
Why jog exquisite bulk, fond crazy vamp,
Daft buxom jonquil, zephyr's gawky vice?
Guy fed by work, quiz Jove's xanthic lamp --
Zow! Qualms by deja vu gyp fox-kin thrice.
-- Lazy Dog