See what process is using a file in Mac OS X

后端 未结 5 635
抹茶落季
抹茶落季 2020-12-04 07:35

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

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 08:35

    lsof will list open files, but it can be a bit awkward for momentary touches (eg, if the file isn't open when lsof runs, it doesn't show).

    I think your best bet would be fernLightning's fseventer.app. It's "nagware", and allows you to watch (graphically) the fsevents API in real-time.

提交回复
热议问题