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.
相关问题
- Xcode debugger displays incorrect values for varia
- Is there a way to report errors in Apple documenta
- Why should we check WIFEXITED after wait in order
- Advice for supporting both Mac and Windows Desktop
- Avoid cmake to add the flags -search_paths_first a
相关文章
- 现在使用swift开发ios应用好还是swift?
- Visual Studio Code, MAC OS X, OmniSharp server is
- xcode 4 garbage collection removed?
- IntelliJ IDEA can't open projects or add SDK o
- Automator: How do I use the Choose from List actio
- ImportError: No module named twisted.persisted.sty
- How can I vertically align my status bar item text
- Emacs/xterm color annoyance on Linux
That's simple:
sudo fs_usage | grep [path_to_file]
The faster way is:
This solution doesn't require the root password and gives you back the following, clear, result:
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.
Another option is Sloth. It's a free, open source GUI for LSOF that others have mentioned.
But I spent 2 minutes Googling and found your answer here.