Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Nov 2004 22:42:15 +0000
From:      Paul Richards <paul@originative.co.uk>
To:        Sam Leffler <sam@errno.com>
Cc:        Paul Richards <paul@freebsd.org>
Subject:   Re: cvs commit: src/usr.bin/tail extern.h forward.c tail.c
Message-ID:  <1099608134.42071.6.camel@myrddin>
In-Reply-To: <200411041208.51978.sam@errno.com>
References:  <200411041918.iA4JIJsd028943@repoman.freebsd.org> <200411041208.51978.sam@errno.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2004-11-04 at 20:08, Sam Leffler wrote:
> On Thursday 04 November 2004 11:18 am, Paul Richards wrote:
> > paul        2004-11-04 19:18:19 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     usr.bin/tail         extern.h forward.c tail.c
> >   Log:
> >   Add support for following more than one file i.e.
> >   tail -f file1 file2
> >
> >   Revision  Changes    Path
> >   1.9       +10 -1     src/usr.bin/tail/extern.h
> > http://cvsweb.FreeBSD.org/src/usr.bin/tail/extern.h.diff?r1=1.8&r2=1.9
> >   1.35      +160 -88   src/usr.bin/tail/forward.c
> > http://cvsweb.FreeBSD.org/src/usr.bin/tail/forward.c.diff?r1=1.34&r2=1.35
> >   1.18      +30 -7     src/usr.bin/tail/tail.c
> > http://cvsweb.FreeBSD.org/src/usr.bin/tail/tail.c.diff?r1=1.17&r2=1.18
> 
> Why is this better than
> 
> tail -f file1&
> tail -f file2
> 
>  Sam

A few reasons.

Main one is that it's a single process. If you debug webservers a lot
you'd like to be able to do:

vi httpd.conf
apachectl restart; tail -f errors access
ctrl C

and then start the cycle again.

With your suggestion it's a bit of a pain to also have to kill the
background job which has a habit of spitting out output when you really
don't want it.

It's more efficient, though that's a marginal argument :-)

You can do things like

find /weservers/logs -name access |xargs tail -f

So, on the whole I think it provides some useful new functionality.

Paul.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1099608134.42071.6.camel>