From owner-freebsd-questions@FreeBSD.ORG Sun Apr 11 17:32:06 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD94F106566C for ; Sun, 11 Apr 2010 17:32:06 +0000 (UTC) (envelope-from merlyn@stonehenge.com) Received: from red.stonehenge.com (red.stonehenge.com [208.79.95.2]) by mx1.freebsd.org (Postfix) with ESMTP id C9B678FC1C for ; Sun, 11 Apr 2010 17:32:06 +0000 (UTC) Received: by red.stonehenge.com (Postfix, from userid 1001) id 3AF8A9423; Sun, 11 Apr 2010 10:32:06 -0700 (PDT) From: merlyn@stonehenge.com (Randal L. Schwartz) To: Jos Chrispijn References: <4BC168D8.7080900@webrz.net> <4BC1972B.1080603@webrz.net> x-mayan-date: Long count = 12.19.17.4.15; tzolkin = 7 Men; haab = 8 Pop Date: Sun, 11 Apr 2010 10:32:06 -0700 In-Reply-To: <4BC1972B.1080603@webrz.net> (Jos Chrispijn's message of "Sun, 11 Apr 2010 11:32:27 +0200") Message-ID: <86aat9uc89.fsf@red.stonehenge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Auto update X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2010 17:32:06 -0000 >>>>> "Jos" == Jos Chrispijn 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 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion