On 10/11/11, Les Mikesell lesmikesell@gmail.com wrote:
On Tue, Oct 11, 2011 at 6:53 AM, hadi motamedi motamedi24@gmail.com wrote:
How about something like this: watch -n 1 lsof /path/to/files
Or maybe: inotifywait -m -e access --format "%T %f" --timefmt "%D
%T" -r
/path/to/files
Excuse me, you are right. I tried again with your "inotifywait" utility and it notifies me when touching a file . It seems that my previous attempt had something wrong in it. But it seems that the "watch" utility brings nothing . Am I right?
intofywait should be event-driven where watch would run the specified command at intervals so it would be a matter of chance to catch a momentary event. You might also be able to see what files had been accessed most recently with 'ls -lurt' in the directory which will sort the most recently accessed file to the end of the list.
-- Les Mikesell lesmikesell@gmail.com _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thank you very much for your help. I tested again and you are right. If I have chance the 'watch' utility can capture the required event as well. At the other hand, you introduced me with the 'ls -lurt' new utility that is helpful my case . So thank you again