有没有监视文件的软件或者脚本。

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

有没有监视文件的软件或者脚本。

#1

帖子 eexpress » 2005-09-28 15:20

就像filemon那样的。
● 鸣学
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#2

帖子 gnix_oag » 2005-09-28 18:14

不是有两个数据库吗
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#3

帖子 eexpress » 2005-09-28 23:10

什么数据库
● 鸣学
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#4

帖子 gnix_oag » 2005-09-28 23:32

一个是 deb 的吧,

另一个是运行 updatedb 建立的
头像
firehare
帖子: 2625
注册时间: 2005-04-10 16:54
来自: 温州大学
联系:

#5

帖子 firehare » 2005-10-06 0:35

updatedb建立的不会动态监视文件的变动的,你必须在每次使用Locate时,都得重新运行一次Updatedb的!
我心无畏,源自于我心无知。
图片
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#6

帖子 eexpress » 2005-10-06 10:14

就是指locate时,从这个数据库中读取位置的那个?
那样不是很大。整个系统都要扫描?
● 鸣学
头像
firehare
帖子: 2625
注册时间: 2005-04-10 16:54
来自: 温州大学
联系:

#7

帖子 firehare » 2005-10-06 11:03

正解!
我心无畏,源自于我心无知。
图片
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

使用 inotify 监控 Linux 文件系统事件

#8

帖子 eexpress » 2005-10-11 22:10

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;
}
● 鸣学
sgt.pepper
帖子: 77
注册时间: 2006-11-22 9:21

#9

帖子 sgt.pepper » 2007-07-07 11:33

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.
回复