查看Mac OS X中使用文件的过程 [英] See what process is using a file in Mac OS X

查看:112
本文介绍了查看Mac OS X中使用文件的过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够跟踪文件并查看哪个进程正在触摸该文件.那可能吗?我知道我可以在活动监视器中看到打开的进程的列表,但是我认为它正在迅速发生.这样做的原因是我正在使用一个框架,并且我认为该框架的系统版本正在使用,而不是调试版本,所以我想看看哪个进程正在使用它.

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 but I think it's happening to quickly for me to see it. The reason for this is I'm using a framework and I think the system version of the framework is being used instead of the debug version and I'd like to see which process is touching it.

推荐答案

lsof将列出打开的文件,但是对于短暂的触摸可能会有些尴尬(例如,如果在运行lsof时文件未打开,则它会不显示).

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).

我认为您最好的选择是fernLightning的

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.

这篇关于查看Mac OS X中使用文件的过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆