From owner-freebsd-questions Tue Aug 28 5:28:30 2001 Delivered-To: freebsd-questions@freebsd.org Received: from Mail6.nc.rr.com (fe6.southeast.rr.com [24.93.67.53]) by hub.freebsd.org (Postfix) with ESMTP id 7BC9237B406 for ; Tue, 28 Aug 2001 05:28:22 -0700 (PDT) (envelope-from bts@babbleon.org) Received: from i8k.babbleon.org ([66.57.85.154]) by Mail6.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Tue, 28 Aug 2001 01:07:23 -0400 Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: Erick Mechler , MurrayTaylor Subject: Re: Checking for files older than a certain time Date: Tue, 28 Aug 2001 01:07:11 -0400 X-Mailer: KMail [version 1.2] Cc: freebsd-questions@FreeBSD.ORG References: <02a301c12f7b$7d816740$2a7627cb@bytecraft.au.com> <20010827214241.D46811@techometer.net> In-Reply-To: <20010827214241.D46811@techometer.net> MIME-Version: 1.0 Message-Id: <01082801071104.26623@i8k.babbleon.org> Content-Transfer-Encoding: 8bit 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 On Tuesday 28 August 2001 00:42, Erick Mechler wrote: > Pretty sure you want to use mtime, not ctime: > > -mtime n > True if the difference between the file last modification time > and the time find was started, rounded up to the next full > 24-hour period, is n 24-hour periods. I'd experiment with atime, ctime, and mtime and see if any of them "look" correct to you. If not, your "diff" approach is reasonable. Or create a file every day and see if the -newer stuff acts any different from any others. I'd have thought that -ctime would be right, though . . . > > --Erick > > At Tue, Aug 28, 2001 at 02:39:57PM +1000, MurrayTaylor said this: > :: Given that I am running a Samba filesystem and have a > :: directory visible to the windoze users that is a > :: 'common' area, what comand could I use to > :: enforce a 14 day storage period before a mandatory erasure > :: occurs? The file time stamps sometimes are waaaaay in the past > :: if someone copies a historic file there so another someone can access > :: it. Yet this historic file should remain in the 14daytemp directory for > :: the 14 day grace period > :: > :: I would like to run a cron job with something like > :: > :: find /tempdir -ctime +14 -delete {} > :: > :: but testing this with -print seems to miss some files I reckon > :: should be clobbered.... > :: > :: Should I do something like > :: ll > somefile > :: ... > :: (14days later ) > :: diff ll somefile (syntax ?) > :: delete anything that pops out from the 14day old ll capture > :: > :: cheers > :: mjt > :: > :: CHANGE OF ADDRESS > :: Please note my new e-mail address > :: > :: Murray Taylor > :: Bytecraft Systems Pty Ltd > :: murraytaylor@bytecraftsystems.com > :: > :: > :: > :: > :: 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 -- 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