Auto update
Randal L. Schwartz
merlyn at stonehenge.com
Sun Apr 11 17:32:06 UTC 2010
>>>>> "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
More information about the freebsd-questions
mailing list