Date: Tue, 28 Aug 2001 01:07:11 -0400 From: Brian T.Schellenberger <bts@babbleon.org> To: Erick Mechler <emechler@techometer.net>, MurrayTaylor <MurrayTaylor@bytecraftsystems.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Checking for files older than a certain time Message-ID: <01082801071104.26623@i8k.babbleon.org> In-Reply-To: <20010827214241.D46811@techometer.net> References: <02a301c12f7b$7d816740$2a7627cb@bytecraft.au.com> <20010827214241.D46811@techometer.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01082801071104.26623>