哪个工具可以显示哪些文件是在 Linux 中编写的?
我在 IOStat 中发现,我的应用程序的某些部分正在广泛写入,但我不知道它是哪个进程以及它正在写入哪些文件。 在 Vista 中,有一个工具可以显示过去 30 秒内处于活动状态的文件。 Linux 有类似的东西吗?
I found in IOStat, that some part of my application is writing extensively, but I don't know which process it is and what files it is writing to. In Vista there is a tool fo that which shows the files that have been active in the last 30 Seconds. Is there something similar for Linux?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
将准确显示您的应用程序正在读取和写入哪些文件
will show you exactly what files your application is reading and writong
如果您想实时查看所有文件访问(最多 32 个进程),您可以使用以下命令:
If you want to see all the file accesses in real time (up to 32 processes) you can use this command:
更多信息:
http://www.mydigitallife.info/2006/01/19/find-files-that-are-modified-today-or -since-特定时间前-in-unix/
more at:
http://www.mydigitallife.info/2006/01/19/find-files-that-are-modified-today-or-since-certain-time-ago-in-unix/
lsof 将列出给定进程的所有打开文件:
lsof -p
lsof will list all open files for a given process:
lsof -p
您正在寻找的是
lsof
。它是一个命令行工具,但在 sourceforge 上也有一个 GUI。
What you are looking for is
lsof
.It's a command line tool but there is also a GUI for it at sourceforge.
不确定程序,但实用程序中的 find 命令有很多选项,可以让您查找在特定时间段内修改过的文件和/或目录。
例如:
将查找最后修改时间为 1 天前的文本文件。
您可以将此调用包装在某种脚本中,或者编写您自己的快速小应用程序来使用结果。
这是一个包含更多信息和示例的网站:
http://www .cyberciti.biz/faq/howto-finding-files-by-date/
Not sure of a program but the find command in utility has a lot of options which will allow you to find files and/or directories that have been modified within a certain time period.
For example:
Would find text files that were last modified 1 days ago.
You could wrap this call in some sort of script or write your own quick little app to use the results.
Here's a site with some more info and examples:
http://www.cyberciti.biz/faq/howto-finding-files-by-date/
Linux 提供了一个名为“dnotify”的文件更改通知 API,以及一个命令行实用程序 dnotify。 您可以使用它来跟踪过去 30 秒的变化。
我可能会编写一个直接在 Linux API 上构建的应用程序,并丢弃所有超过 30 秒的事件。
Linux provides a file change notification API called "dnotify", along with a command line utility dnotify. You can use that to keep track of the changes over the last 30s.
I would probably write an application that builds directly on the Linux API, and discards all events older than 30s.