Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Deleting files from O/S older than 6 hours

Re: Deleting files from O/S older than 6 hours

From: Nigel Thomas <nigel_cl_thomas_at_yahoo.com>
Date: Thu, 29 Nov 2007 02:56:17 -0800 (PST)
Message-ID: <551738.16269.qm@web58808.mail.re1.yahoo.com>


Another trick is to create or touch a marker file at the time you do the move, which you can use "next time" to tell you the O/S time to compare with:

   find files newer than marker file (see earlier post)    move them / delete them / archive them    touch marker file now

Then if for any reason there is a delay in launching your purge (if your script launcher such as the database or cron is down for any reason) the mechanism automatically self corrects... maybe the period is now 7 hours rather than 6. This also allows you to change the schedule frequency without having to change the script itself.

The only small issue is what happens to files added between 1 and 3 (as the operations aren't exactly ACID)

Regards Nigel

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Nov 29 2007 - 04:56:17 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US