0
Here is a problem, can someone please explain or provide some references. I've been trying to read since an hour but can not find the answer.
Suppose, I have process1 going on a pool of directories. process1 picks a directory and creates, say, .csv files inside it. The .csv files are being appended to, and are, therefore, incomplete while process1 is continuing on this, say, directory1. process1 then moves on to directory2 and so on.
Now, I want to do something with csvs in directories that process1 has finished with. Ideally, I should check which directories have been finished with and run process2 on those. But in my infinite wisdom, I do this:
find directories* -type f -name '*.csv' -exec process2
My assumption was that find will first find all csvs existing till the point of invocation of find and then -exec process2 on those only, ignoring any csvs that will have been made after the invocation of find.
It seems I was wrong (still not sure). Can someone explain, please?
Thanks.
Couldn't you have process1 execute process2 after it finishes with the file? – Rob – 2013-01-02T17:58:56.097
Well yes. You are right. It is not a problem as in there isn't a solution. This is a problem as in I did something this stupid and am now just trying to understand the repercussions of it. Thanks anyway. – ASB – 2013-01-02T18:31:08.897