On 11 April 2010 18:32, Randal L. Schwartz <[email protected]> wrote:

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

no use -F not -f as log rotation will break it otherwise
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to