Date: Mon, 27 Aug 2001 21:42:41 -0700 From: Erick Mechler <emechler@techometer.net> To: MurrayTaylor <MurrayTaylor@bytecraftsystems.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Checking for files older than a certain time Message-ID: <20010827214241.D46811@techometer.net> In-Reply-To: <02a301c12f7b$7d816740$2a7627cb@bytecraft.au.com>; from MurrayTaylor on Tue, Aug 28, 2001 at 02:39:57PM %2B1000 References: <02a301c12f7b$7d816740$2a7627cb@bytecraft.au.com>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010827214241.D46811>
