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

相关内容

热门资讯

自己制作安卓系统教程,自制安卓... 亲爱的读者们,你是否曾梦想过摆脱安卓系统的束缚,亲手打造一个只属于你自己的操作系统?别再羡慕那些技术...
安卓系统调整器下载,轻松优化手... 你有没有发现,手机用久了,系统总是有点小问题,比如卡顿啦,电池续航不给力啦,这些小烦恼是不是让你头疼...
怎样升级安卓系统视频,安卓系统... 亲爱的手机控们,你是否也和我一样,对手机系统升级充满了好奇和期待?想象你的安卓手机在经过一番“变身”...
鸿蒙系统和安卓系统哪个广告少,... 你有没有发现,现在手机市场上的操作系统真是五花八门,让人挑花了眼。不过,最近有个话题特别火,那就是鸿...
安卓系统openrec怎么注册... 你有没有想过,想要在安卓系统上体验一把OpenRec的乐趣,却发现注册步骤有点让人摸不着头脑?别急,...
怎样更新车机安卓系统,车机安卓... 亲爱的车主朋友们,你是不是也和我一样,对车机系统里的安卓系统充满了好奇?想要让它焕然一新,变得更加强...
安卓机换系统后照片,照片如何完... 你有没有遇到过这种情况:手机里的照片突然消失得无影无踪,心里那个急啊,就像热锅上的蚂蚁。别担心,今天...
安卓手机定位系统软件,技术原理... 你有没有想过,你的安卓手机里那些神奇的定位系统软件是怎么工作的呢?它们就像你的私人侦探,随时随地告诉...
安卓制作win系统盘,打造Wi... 亲爱的读者,你是否曾想过,将安卓系统的魅力与Windows系统的强大功能完美结合?今天,就让我带你一...
系统警告_您的安卓手机,揭秘潜... 亲爱的手机主人,最近你的安卓手机是不是突然跳出来一个系统警告,让你心头一紧?别慌,今天就来给你详细解...
投屏安卓系统版本,揭秘不同版本... 你有没有想过,家里的电视屏幕那么大,却只能用它来看电视?现在,有了安卓系统,你就可以把手机上的精彩内...
安卓官方系统升级软件,畅享智能... 你有没有发现,你的安卓手机最近是不是变得有点儿“年轻”了?没错,这就是安卓官方系统升级的魅力所在!今...
安卓系统铃声长度是多少,时长差... 你有没有想过,为什么你的手机每次收到消息时,都会响起那熟悉的铃声?是不是好奇过,安卓系统的铃声长度到...
酷派电脑系统安卓,深度解析与全... 亲爱的读者们,你是否曾对那些在电脑世界里游刃有余的酷派电脑系统安卓版心生好奇?今天,就让我带你一起揭...
什么系统可以装安卓软件,基于A... 你有没有想过,你的手机里那些好玩又实用的安卓软件,其实也可以在其他设备上运行呢?没错,这就是今天我们...
制作安卓系统主题软件,安卓系统... 你有没有想过,给你的安卓手机换一个全新的面貌?没错,就是那种一打开手机,就能感受到完全不同的风格和氛...
安卓系统平板怎么截屏,操作指南... 亲爱的平板用户,你是不是也和我一样,有时候想记录下平板上的精彩瞬间,却发现截屏功能有点神秘?别担心,...
安卓系统不推送更新,揭秘背后的... 最近是不是发现你的安卓手机有点儿“懒”啊?更新推送总是慢吞吞的,让人等得花儿都谢了。别急,今天就来给...
ape格式转换安卓系统,享受音... 你有没有想过,你的安卓手机里的ape格式音乐文件,竟然可以通过一个小小的转换,焕发出全新的生命力?没...
获取安卓系统加载器,核心功能与... 你有没有想过,你的安卓手机里那些神奇的软件和游戏是怎么被安装到你的设备上的呢?没错,就是通过一个叫做...