From owner-freebsd-questions@FreeBSD.ORG Mon Apr 12 08:44:59 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 284D81065672 for ; Mon, 12 Apr 2010 08:44:59 +0000 (UTC) (envelope-from kraduk@googlemail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id A73D68FC19 for ; Mon, 12 Apr 2010 08:44:58 +0000 (UTC) Received: by bwz8 with SMTP id 8so2687366bwz.3 for ; Mon, 12 Apr 2010 01:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=F7Znl7W8ZEBcHK/9vD+xlzfTD2fp5eGdm/dIui6i90U=; b=x/q5x2J1SKI1MIJIGTht0NZ/eocClsgf82IS4paPW5QAxyas+OTI9wEa2jmrHdr18k dfvYoswwY8ooiByIdpVuVVccTIzHHfTabU6/seYf/xvwpcLO2IMpHwaGgR5KK1AKXwUl zWYTlCdzBaPLmJK/q4wJryjRpx8Det0Ay+cO8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=tF8nbOFdECTuxN4HsZqwnPfM9IxB5+DYX6LYLjYHdottQHtl6POU0sy/diSJQ+C+DT YAxAdR4bLne8vMgy4x9BbUcXz44FhyPjaLPLCPcqFOrv29ujc1/3LKSsOAN1yns7VRmQ igkv53mGEQTBIx4NdMn/pGqqUgUc7qyyfscsk= MIME-Version: 1.0 Received: by 10.239.165.129 with HTTP; Mon, 12 Apr 2010 01:44:57 -0700 (PDT) In-Reply-To: <86aat9uc89.fsf@red.stonehenge.com> References: <4BC168D8.7080900@webrz.net> <4BC1972B.1080603@webrz.net> <86aat9uc89.fsf@red.stonehenge.com> Date: Mon, 12 Apr 2010 09:44:57 +0100 Received: by 10.239.193.139 with SMTP id j11mr325954hbi.127.1271061897403; Mon, 12 Apr 2010 01:44:57 -0700 (PDT) Message-ID: From: krad To: "Randal L. Schwartz" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jos Chrispijn , 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: Mon, 12 Apr 2010 08:44:59 -0000 On 11 April 2010 18:32, Randal L. Schwartz wrote: > >>>>> "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 > _______________________________________________ > 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