Date: Tue, 9 Apr 2002 10:18:27 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Zhihui Zhang <zzhang@cs.binghamton.edu> Cc: freebsd-questions@freebsd.org Subject: Re: monitor the growth of a file. Message-ID: <20020409101827.A35830@xor.obsecurity.org> In-Reply-To: <Pine.SOL.4.21.0204091307360.2802-100000@onyx>; from zzhang@cs.binghamton.edu on Tue, Apr 09, 2002 at 01:09:42PM -0400 References: <Pine.SOL.4.21.0204091307360.2802-100000@onyx>
next in thread | previous in thread | raw e-mail | index | archive | help
--CE+1k2dSO48ffgeK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 09, 2002 at 01:09:42PM -0400, Zhihui Zhang wrote: >=20 > I have a text file that grows steadily by an application. Is there a way I > can monitor the growth of it? One way is to write a script with a line > like "cat filename | tail" in a loop. But is there a better way? Write a small utility which monitors file writes using kevent() and then does a stat(). Kris --CE+1k2dSO48ffgeK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8syJjWry0BWjoQKURAlOaAJ9uvnqTMzpWaq1CbtADOFm5D3uXIACfUT9f brXdUkCIytb3C8j0skQyAls= =ENSG -----END PGP SIGNATURE----- --CE+1k2dSO48ffgeK-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020409101827.A35830>