From owner-freebsd-questions@FreeBSD.ORG Tue May 11 20:04:23 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B6F0216A4CE for ; Tue, 11 May 2004 20:04:23 -0700 (PDT) Received: from mta9.adelphia.net (mta9.adelphia.net [68.168.78.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 562E943D1D for ; Tue, 11 May 2004 20:04:23 -0700 (PDT) (envelope-from Barbish3@adelphia.net) Received: from barbish ([67.20.101.71]) by mta9.adelphia.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with SMTP id <20040512030422.SYOQ26615.mta9.adelphia.net@barbish> for ; Tue, 11 May 2004 23:04:22 -0400 From: "JJB" To: "freebsd-questions@FreeBSD. ORG" Date: Tue, 11 May 2004 23:04:21 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Subject: newsyslog command in an script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Barbish3@adelphia.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2004 03:04:23 -0000 In an csh script I want to issue newsyslog /var/log/security. I need feedback from the newsyslog command in the form of an script testable return code / exit code so I can determine if the specified log met the rotate trigger for that file as defined in the newsyslog.conf file and the file was rotated or not. I have tested and know that newsyslog /var/log/security does check the newsyslog.config for an entry of /var/log/security and checks the size/time/date trigger to determine if file needs rotating. So my question boils down to does the newsyslog command issue an return code I can check in an script to see if the log was rotated or not? If so what would the csh script command look like to perform the test? Thanks Joe