有没有监视文件的软件或者脚本。
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
- gnix_oag
- 帖子: 1994
- 注册时间: 2005-05-19 18:38
- 来自: 湖南永州
- 联系:
- gnix_oag
- 帖子: 1994
- 注册时间: 2005-05-19 18:38
- 来自: 湖南永州
- 联系:
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系:
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系:
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
使用 inotify 监控 Linux 文件系统事件
inotify 支持许多非常细粒度的事件 —— 例如 CLOSE 与 CLOSE_WRITE。
int main (int argc, char **argv)
{
/* This is the file descriptor for the inotify device */
int inotify_fd;
/* First we open the inotify dev entry */
inotify_fd = open_inotify_dev();
if (inotify_fd < 0)
{
return 0;
}
int main (int argc, char **argv)
{
/* This is the file descriptor for the inotify device */
int inotify_fd;
/* First we open the inotify dev entry */
inotify_fd = open_inotify_dev();
if (inotify_fd < 0)
{
return 0;
}
● 鸣学
-
- 帖子: 77
- 注册时间: 2006-11-22 9:21
inotify怎么用,难道要写代码?
代码: 全选
Mark
Admin Group
Joined: 04 June 2005
Location: United States
Online Status: Offline
Posts: 388
Posted: 18 July 2005 at 12:23pm
http://forum.sysinternals.com/forum_posts.asp?TID=179
Its discontinued since Linus made changes to the Linux kernel that broke Filemon's driver. Linux has no supported way for writing a tool with capabilities equivalent to Filemon for Windows.