From owner-freebsd-questions Tue Aug 28 17:39:23 2001 Delivered-To: freebsd-questions@freebsd.org Received: from wombat.bytecraft.au.com (wombat.bytecraft.au.com [203.39.118.3]) by hub.freebsd.org (Postfix) with ESMTP id BB1A237B403 for ; Tue, 28 Aug 2001 17:39:19 -0700 (PDT) (envelope-from MurrayTaylor@bytecraftsystems.com) Received: from lt99101401.bytecraft.au.com (unknown [203.39.118.42]) by wombat.bytecraft.au.com (Postfix) with SMTP id 8914A3F14; Wed, 29 Aug 2001 10:39:18 +1000 (EST) Message-ID: <005f01c13023$093150a0$2a7627cb@bytecraft.au.com> Reply-To: "MurrayTaylor" From: "MurrayTaylor" To: "Brian T.Schellenberger" , "Paul Branston" , "David Okeby" Cc: References: <20010828110441.C31370@rannoch.demon.co.uk> <01082808372107.26623@i8k.babbleon.org> Subject: Re: shell script to remove dated files Date: Wed, 29 Aug 2001 10:39:17 +1000 Organization: Bytecraft Systems MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Brian T.Schellenberger" To: "Paul Branston" ; "David Okeby" Cc: Sent: Tuesday, August 28, 2001 10:37 PM Subject: Re: shell script to remove dated files > On Tuesday 28 August 2001 06:04, Paul Branston wrote: > > On Tue, Aug 28, 2001 at 05:31:44AM +0800, David Okeby wrote: > > > Hi, > > > > > > How do I write a shell script that removes old files? Say something of > > > the order of two weeks old. > > > > > > Thanks > > > > > > David > > > david@okeby.com > > > > have a read at the find man page. You need somethimg like > > > > find /path -mtime +14 -exec rm {} \; > > I recommend -atime instead. THis way if they've been reading it, it won't > vanish on them. Of course it depends on the purpose of the script. > I have an unchecked suspicion that windoze explorer via samba 'accesses' the files on any/every directory display ... therefore the files will never age > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-questions" in the body of the message > > -- > Brian T. Schellenberger . . . . . . . bts@wnt.sas.com (work) > Brian, the man from Babble-On . . . . bts@babbleon.org (personal) > > --------------------> Free Dmitry Sklyarov! <------------------------- > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message