From owner-freebsd-questions Mon Aug 27 21:42:55 2001 Delivered-To: freebsd-questions@freebsd.org Received: from radix.cryptio.net (radix.cryptio.net [199.181.107.213]) by hub.freebsd.org (Postfix) with ESMTP id B0CB637B403 for ; Mon, 27 Aug 2001 21:42:51 -0700 (PDT) (envelope-from emechler@radix.cryptio.net) Received: (from emechler@localhost) by radix.cryptio.net (8.11.3/8.11.3) id f7S4gfH46929; Mon, 27 Aug 2001 21:42:41 -0700 (PDT) (envelope-from emechler) Date: Mon, 27 Aug 2001 21:42:41 -0700 From: Erick Mechler To: MurrayTaylor Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Checking for files older than a certain time Message-ID: <20010827214241.D46811@techometer.net> References: <02a301c12f7b$7d816740$2a7627cb@bytecraft.au.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <02a301c12f7b$7d816740$2a7627cb@bytecraft.au.com>; from MurrayTaylor on Tue, Aug 28, 2001 at 02:39:57PM +1000 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 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. --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