fanotify
admin
2024-01-25 13:22:31
0

Linux文件事件监控之Fanotify [一] - 知乎 (zhihu.com)

 

文件系统事件InotifyFanotify
ACCESSYY
MODIFYYY
ATTRIBY
CLOSE_WRITEYY
CLOSE_NOWRITEYY
OPENYY
MOVED_FROMY
MOVED_TOY
CREATEY
DELETEY
DELETE_SELFY
MOVE_SELFY
UNMOUNTY
OPEN_PERMY
CCESS_PERMY

FAN_ACCESS
              A file or a directory (but see BUGS) was accessed (read).

       FAN_OPEN
              A file or a directory was opened.

       FAN_OPEN_EXEC
              A file was opened with the intent to be executed.  See
              NOTES in fanotify_mark(2) for additional details.

       FAN_ATTRIB
              A file or directory metadata was changed.

       FAN_CREATE
              A child file or directory was created in a watched parent.

       FAN_DELETE
              A child file or directory was deleted in a watched parent.

       FAN_DELETE_SELF
              A watched file or directory was deleted.

       FAN_MOVED_FROM
              A file or directory has been moved from a watched parent
              directory.

       FAN_MOVED_TO
              A file or directory has been moved to a watched parent
              directory.

       FAN_MOVE_SELF
              A watched file or directory was moved.

       FAN_MODIFY
              A file was modified.

       FAN_CLOSE_WRITE
              A file that was opened for writing (O_WRONLY or O_RDWR)
              was closed.

       FAN_CLOSE_NOWRITE
              A file or directory that was opened read-only (O_RDONLY)
              was closed.

       FAN_Q_OVERFLOW
              The event queue exceeded the limit of 16384 entries.  This
              limit can be overridden by specifying the
              FAN_UNLIMITED_QUEUE flag when calling fanotify_init(2).

       FAN_ACCESS_PERM
              An application wants to read a file or directory, for
              example using read(2) or readdir(2).  The reader must
              write a response (as described below) that determines
              whether the permission to access the filesystem object
              shall be granted.

       FAN_OPEN_PERM
              An application wants to open a file or directory.  The
              reader must write a response that determines whether the
              permission to open the filesystem object shall be granted.

       FAN_OPEN_EXEC_PERM
              An application wants to open a file for execution.  The
              reader must write a response that determines whether the
              permission to open the filesystem object for execution
              shall be granted.  See NOTES in fanotify_mark(2) for
              additional details.

       To check for any close event, the following bit mask may be used:

       FAN_CLOSE
              A file was closed.  This is a synonym for:

                  FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE

       To check for any move event, the following bit mask may be used:

       FAN_MOVE
              A file or directory was moved.  This is a synonym for:

                  FAN_MOVED_FROM | FAN_MOVED_TO

       The following bits may appear in mask only in conjunction with
       other event type bits:

       FAN_ONDIR

相关内容

热门资讯

安卓8.1系统解锁方法,畅享自... 你有没有想过,你的安卓手机里隐藏着无数的小秘密?比如,解锁安卓8.1系统,就能让你的手机焕发出全新的...
安卓系统怎么打开邮件,安卓系统... 你有没有想过,每天那么多邮件,怎么才能快速打开它们呢?尤其是当你用的是安卓系统手机的时候。别急,今天...
封闭安卓系统安装软件,一步到位... 你有没有想过,为什么你的安卓手机里有些软件只能通过官方渠道安装呢?今天,就让我带你一探究竟,揭开封闭...
小米mipad升级安卓系统,解... 你有没有发现,最近小米Mipad的安卓系统升级可是个大热门呢!这不,我就迫不及待地来和你聊聊这个话题...
哪个安卓系统体验好,揭秘安卓系... 你有没有想过,手机里的安卓系统就像是个大厨,不同的版本就是不同的拿手好菜,有的让你回味无穷,有的却让...
安卓系统开发测试,全方位技术解... 你有没有想过,那个陪伴你每天刷手机、玩游戏、办公的安卓系统,是怎么从无到有,一步步成长起来的呢?今天...
安卓系统怎么查配置,轻松掌握设... 你有没有想过,你的安卓手机里藏着多少秘密?别小看这些配置信息,它们可是了解你手机性能的“小侦探”呢!...
pve下安装安卓系统,PVE环... 你有没有想过,在你的PVE服务器上安装一个安卓系统呢?听起来是不是有点酷炫?想象你的服务器不仅能够运...
安卓手机安装虹膜系统,安卓手机... 你有没有想过,你的安卓手机还能这样玩?没错,就是安装虹膜系统!听起来是不是有点酷炫?别急,让我带你一...
小米论坛原生安卓系统,深度解析... 你有没有想过,你的手机系统其实可以更加纯粹、更加原生?今天,就让我带你走进小米论坛,一探究竟,看看那...
安卓怎么装iphone系统,轻... 你是不是也和我一样,对安卓手机上的iPhone系统充满了好奇?想象那流畅的界面、强大的性能,还有那独...
模拟器系统安卓,打造移动应用开... 你有没有想过,在手机上也能体验到电脑游戏的快感?没错,这就是安卓模拟器系统的魅力所在!今天,就让我带...
安卓系统清理系统更新包,提升运... 手机里的安卓系统是不是越来越慢了?别急,今天就来给你支个招,让你的安卓手机焕然一新!那就是——清理系...
酷开系统是安卓系统不,深度解析... 亲爱的读者,你是否曾好奇过,那些在我们手机、电视上运行得风生水起的操作系统,它们之间究竟有何不同?今...
小说系统类游戏安卓,安卓世界逆... 你有没有想过,在手机上玩一款能让你瞬间穿越到小说世界的游戏?想象你不再是旁观者,而是故事的主角,那种...
安卓系统网页上传文件,安卓系统... 你有没有遇到过这种情况:手机里存了好多文件,想要上传到网页上分享,却发现安卓系统的操作有点儿复杂?别...
xp系统能刷安卓系统吗,体验全... 你有没有想过,你的老XP系统是不是也能玩转安卓的乐趣呢?没错,今天就来聊聊这个话题,看看XP系统能不...
安卓系统图标修改方法,让你的手... 你有没有发现,手机里的安卓系统图标总是那么单调乏味?是不是也想给它们换上新鲜的衣服,让手机界面焕然一...
gta安卓系统怎么下载,轻松安... 你有没有想过,在手机上玩那些刺激的GTA游戏呢?想象你可以在繁忙的街头驾驶飞车,或者在虚拟世界中成为...
找不到安卓子系统,揭秘原因及解... 最近我在使用安卓手机的时候遇到了一个让人头疼的问题——找不到安卓子系统!这可真是让我抓耳挠腮,不知道...