[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tailing rotating log files



Brad: thanks, this is exactly what I was looking for.

The version of tail included with "slink" does not have this functionality.
What would be the recommended means of upgrading?

a) obtain gnu source and compile?  This would work but would mean I would
have to play games with dpkg (perhaps using equivs) in order to make it
think I've upgraded the package.

b) get potato source deb and make an slink package, which should take care
of dpkg's concerns.

c) other methods?

"b" sounds like a good idea, but I'm not sure how to do it at the moment,
never built a dpkg package before (I will figure it out).  BUT -- I can't
find any source debs on ftp.us.debian.org.  Where should I be looking?  I
see source tarballs and that's it... is this what I should use to build the
package?  I always thought there was something like the "source rpm" concept
in .deb format, where the package is all laid out and just needs to be
re-compiled and re-packaged.

Thanks for all the help.  (I love this list.)  :)


----- Original Message -----
From: Brad <lists@anomie.dhis.org>
To: Jim B <vader@conflict.net>
Cc: Debian-user <debian-user@lists.debian.org>
Sent: Sunday, September 19, 1999 1:32 PM
Subject: Re: tailing rotating log files


> -----BEGIN PGP SIGNED MESSAGE-----
>
> On Sun, 19 Sep 1999, Jim B wrote:
>
> > Hi, I generallly keep some of my log files open ni a terminal via
tail -f.
> > For example:
> > tail -f /var/log/messages
> >
> > However, tail does not "move" to the new "messages" (or whatever) log
file
> > when they are rotated by savelog.  So for example, I will still see the
last
> > lines from the old messages file and I will have to terminate tail and
run
> > it again to force it to move to the new messages file.
> >
> > If the file is moved and a new one put in its place, I'd like to start
> > reading the new file.  I don't see any way to do this with tail (I
checked
> > in the man/info pages).  Is there a program which will do this?
>
> At least with the tail in potato (tail (GNU textutils) 2.0), there is an
> option to do this. The default option of tail with the -f option is to
> open the file and follow that file descriptor. If you use "--follow=name"
> instead of -f, it will periodically reopen the file to check if the file
> was moved.
>
> For example, i executed the following commands while tailing the file.
>   $ echo "line 1" >> tail.test
>   $ echo "line 2" >> tail.test
>   $ mv tail.test tail.test.1; echo "line 3" >> tail.test
>
> Here's the tail output:
>   $ tail --follow=name tail.test
>   line 1
>   line 2
>   tail: `tail.test' has been replaced;  following end of new file
>   line 3
>
>
>
> - --
>   finger for PGP public key.
>
> -----BEGIN PGP SIGNATURE-----
> Version: 2.6.3ia
> Charset: noconv
>
> iQCVAwUBN+UeH77M/9WKZLW5AQHenAQAlMhGO9VIX9WVlKmetyVmRm6Zrjkg5klx
> i2PT/FjZ0aOxR7q71xLPEA4Yu/lron1PSC1S6aiPE02QHZOPY+Pekz847px91BKj
> aS7C6LZ9nyWydd5WKnStjLMim6WJPtjhH7oBAzK9tp7cGYzRGrG4jWBfmF1iOXOz
> ZQlRtNnD6zg=
> =pYka
> -----END PGP SIGNATURE-----
>
>
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org <
/dev/null
>


Reply to: