Is there any other way of finding out if my file is just modified or is newly created
Hello,
The issue is that I have a flat file that gets updated at irregular intervals. A java program polls the flat file and reads the new records that have come. When the flat file exceeds some size, I rename it and create another file in its place, to which records may be populated immediately. Now the java program needs to know that the records dont need to be read from some between but right from the top as the file is new and all the records in it are unread.
My question is, how can i find in Linux, if my file is just modified or is created anew. I tried doing this with inode but the inode gets changed on modification as well as creation so there is no way of knowing. I cannot use size also.
Is there any other way of finding out if my file is just modified or is newly created.
Thanks,
Deepti.
|