At 10:49 AM 2/12/2004, you wrote:

On Feb 12, 2004, at 8:58 AM, Timothy C. Bohen wrote:


Anyone willing to send me a script that I can use?


Sure, here's mine written in Perl. It knows enough to check the timestamps so it doesn't fetch files when unecessary, keeps a backup copy, and does everything in a safe manner such as to not leave your system in an unusable state at any time. It relies on the fact that the rename() function is atomic. I don't make that guarantee on non-unix systems.

Slightly off topic -


Be careful with that assumption. rename() is NOT atomic on windows systems. You script should work since it won't be competing with multiple instances of itself and is not coordinating with other threads, but it's good to keep in mind for other projects. Similarly, writes to files in append mode are also not atomic in windows. Watch out!

_M

This E-Mail came from the [EMAIL PROTECTED] mailing list. For information and (un)subscription instructions go to http://www.sortmonster.com/MessageSniffer/Help/Help.html

Reply via email to