Date: Mon, 12 Apr 2010 09:44:57 +0100 From: krad <kraduk@googlemail.com> To: "Randal L. Schwartz" <merlyn@stonehenge.com> Cc: Jos Chrispijn <kernel@webrz.net>, freebsd-questions@freebsd.org Subject: Re: Auto update Message-ID: <j2xd36406631004120144k186ffb3dmda70d62199d0a592@mail.gmail.com> In-Reply-To: <86aat9uc89.fsf@red.stonehenge.com> References: <4BC168D8.7080900@webrz.net> <F02E5989-F279-4059-9858-EF36FDA726FC@lafn.org> <4BC1972B.1080603@webrz.net> <86aat9uc89.fsf@red.stonehenge.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11 April 2010 18:32, Randal L. Schwartz <merlyn@stonehenge.com> wrote: > >>>>> "Jos" == Jos Chrispijn <kernel@webrz.net> writes: > > Jos> In order to find out if someone logged in, I should then first copy > auth.log > Jos> to auth2.log, and do a compare and then do the tail trick. Have to > cron that > Jos> every half a minute. > > No, just track it with tail -f as was already suggested. > > tail -f /var/log/authlog | while read aline; do; ... ; done > > The code in the middle will get executed as each line appears in the > file. This even survives authlog renaming when you logroll. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > <merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> > Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. > See http://methodsandmessages.vox.com/ for Smalltalk and Seaside > discussion > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > no use -F not -f as log rotation will break it otherwise
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?j2xd36406631004120144k186ffb3dmda70d62199d0a592>