in reply to Timestamp conditional
This sounds like an XY Problem. The code you've given (besides the funky use of abs - I would just reverse the time and stat call), does not really check if the file is at least 20 minutes old - just that it was last modified at least 20 minutes ago. Given the general wonkiness of system clocks and finicky filesystems (nfs), this sounds like a recipe for a long night of sleepless debugging.
In the past, I've seen appoaches like this for trying to determine if some file has finished processing (ala ftp'ing a file). The general consensus in that regard is to always process under one file name convention (.file or file.part) and when done, rename it to something your follow on process looks for (file or file.done).
But then again ... maybe I'm just reading too much into the OP.
|
|---|