Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

Re: Preventing sleep

Curt Sampson (cjs@portal.ca)
Sun, 14 Jun 1998 17:37:00 -0700 (PDT)

On Sun, 14 Jun 1998, Kevin Chu wrote:

> On systems that are on all the time and actually doing something, do
> they use 'tail -f' or do the admins write their own scripts and stuff
> to watch the logs?

This is why I added the `-F' option to tail NetBSD.

-F The -F option is the same as the -f option, except that every
five seconds tail will check to see if the file named on the com-
mand line has been shortened or moved (it is considered moved if
the inode or device number changes) and, if so, it will close the
current file, open the filename given, print out the entire con-
tents, and continue to wait for more data to be appended. This
option is used to follow log files though rotation by newsys-
log(8) or similar programs.

The source is in

ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/usr.bin/tail

You can feel free to use it directly or to rip out chunks of that
and incorporate it into GNU tail. (The BSD license is not as strict
than the GNU license, so there's no problem going in that direction.)

cjs

Curt Sampson cjs@portal.ca Info at http://www.portal.ca/
Internet Portal Services, Inc. Through infinite mist, software reverberates
Vancouver, BC (604) 257-9400 In code possess'd of invisible folly.