Subject: Re: tail follow multiple files?
To: None <tech-userlevel@NetBSD.org>
From: Xin LI <delphij@frontfree.net>
List: tech-userlevel
Date: 07/04/2005 14:38:30
--=-BgAcK1nurKU7SJwLBKce
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,

> > Since tail only processes a single file at a time, tail -f on multple
> > files just doesn't make sense.
>=20
> That's funny; it makes sense to me - and, apparently, a bunch of other
> people....
>=20
> > If you want the merged output from many files just run multiple
> > copies of tail -f in the background....
>=20
> ...and then how to suspend them all, and resume them all, together?
>=20
> I suppose sh -c '(for f in file1 file2 file3; do echo tail -f "$f &";
> done; echo wait) | sh' works, after a fashion.  But that doesn't ID the
> file -f-generated output belongs to.

Just FYI, here are the original FreeBSD commits to implement kqueue
based tail -f on multiple files, which you may have interest to take a
look at:

http://lists.freebsd.org/pipermail/cvs-src/2004-November/034563.html
http://lists.freebsd.org/pipermail/cvs-src/2005-January/038281.html
http://lists.freebsd.org/pipermail/cvs-src/2005-January/038419.html
http://lists.freebsd.org/pipermail/cvs-src/2005-February/039831.html

Cheers,
--=20
Xin LI <delphij delphij net>  http://www.delphij.net/

--=-BgAcK1nurKU7SJwLBKce
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQBCyNlm/cVsHxFZiIoRAqM+AJ9HDDnKlgduzsCx4ROteYRqzzqkNgCfT48l
GRL8lmwMTnWHovhN6tZvXTw=
=e/Y6
-----END PGP SIGNATURE-----

--=-BgAcK1nurKU7SJwLBKce--