Quote:
Originally Posted by mech123
I already checked this find option but it is not fulfulling my query.
for eg. i used command find -amin 360,it gives me all files which are accessed in last 6hrs.But Sir,what if a file comes in directory 6hrs ago and in last 6hrs user use vi command to open the file. then this file will also come in listing but this file came in directory 6hr ago,which i dont want bcz i only want lising of those files which came in directory in last 6hrs.
|
How about keeping track of the processes that have accessed files in that folder, through a script? Now, if we find that the file has been accessed by 'vi' in the last 6 hours, then we will know its not the one we need.
Can you change the destination folder of the files? I mean, now files come into folder abc. We change the settings and make them come to folder xyz.
Initially xyz folder will be empty.
We run a loop, that we will keep looking for files in xyz. Once it sees a file in it, it will add its name and time into a file LOG. Then it will move it to abc folder.
Once the file is in abc folder, all users can access and modify it.
folder xyz is again empty.
Now to see the files that came in the last 6 hour, you can access LOG.
Hope it helps.
Regards