查看 Mac OS X 中哪个进程正在使用文件 [英] See what process is using a file in Mac OS X

查看:66
本文介绍了查看 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 的 fseventer.app.它是nagware",可让您实时(以图形方式)观看 fsevents API.

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天全站免登陆