Auto update

krad kraduk at googlemail.com
Mon Apr 12 08:44:59 UTC 2010


On 11 April 2010 18:32, Randal L. Schwartz <merlyn at stonehenge.com> wrote:

> >>>>> "Jos" == Jos Chrispijn <kernel at 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 at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at freebsd.org"
>

no use -F not -f as log rotation will break it otherwise


More information about the freebsd-questions mailing list