I would like to be able to track a file and see which process is touching that file. Is that possible? I know that I can see the list of open processes in activity monitor
The faster way is:
$ lsof [path_to_file]
This solution doesn't require the root password and gives you back the following, clear, result:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME Finder 497 JR7 21r REG 1,2 246223 33241712 image.jpg QuickLook 1007 JR7 txt REG 1,2 246223 33241712 image.jpg