Re: Deleting files from O/S older than 6 hours
- From: Nigel Thomas <nigel_cl_thomas@xxxxxxxxx>
- To: kennaim@xxxxxxxxx, ajayoraclel@xxxxxxxxx, Remigiusz Sokolowski <rems@xxxxxxxx>
- Date: Thu, 29 Nov 2007 02:56:17 -0800 (PST)
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
- Follow-Ups:
- Re: Deleting files from O/S older than 6 hours
- From: Carel-Jan Engel
Other related posts:
- » Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » RE: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- » Re: Deleting files from O/S older than 6 hours
- Re: Deleting files from O/S older than 6 hours
- From: Carel-Jan Engel