当前位置: 首页 > news >正文

Linux: FS: inotify

这个和网卡的event-notify是一样的逻辑,内核看到有什么事情发生,可以通知到用户,然后用户可以根据自己的需求做一些处理。第一次看到,记录一下算是可以日后可以用到的功能。
man inotify。

inotify - monitoring filesystem events
描述: The inotify API provides a mechanism for monitoring filesystem events. Inotify can be used to monitor individual files, or to monitor directories. When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory.

The following system calls are used with this API:
* inotify_init(2) creates an inotify instance and returns a file descriptor referring to the inotify instance. The more recent inotify_init1(2) is like inotify_init(2), but has a flags argument that provides access to some extra functionality.

  • inotify_add_watch(2) manipulates the “watch list” associated with an inotify instance. Each item (“watch”) in the watch list specifies the pathname of a file or directory, along with some set of events th

相关文章:

  • matlab 计算两点云之间的放缩倍数
  • python+Qt5+sqllite 个性化单词记忆软件设计
  • 水库监管AI视觉算法与边缘计算盒子
  • 通过查看ThreadLocal的源码进行简单理解
  • Unittest单元测试之unittest用例执行顺序
  • 机器学习笔记 - 基于百度飞桨PaddleSeg的人体分割模型以及TensorRT部署说明
  • 【C++初阶(十)】set、map、multiset、multimap的介绍及使用
  • 【Qt】获取当前系统用户名:9种获取方式
  • 有趣的小算法
  • 可可爱爱的羽绒服,面料是三防的哦
  • 高级算法设计与分析练习1-10
  • matlab基于线性二次调节器(LQR)法实现机器人路径规划可变轨迹跟踪
  • Leetcode 第 110 场双周赛 Problem D 2809. 使数组和小于等于 x 的最少时间(DP+贪心+正难则反)
  • 分布式架构demo
  • IP地理定位技术的服务内容详解
  • 【刷算法】求1+2+3+...+n
  • flutter的key在widget list的作用以及必要性
  • HTML5新特性总结
  • iOS动画编程-View动画[ 1 ] 基础View动画
  • Linux链接文件
  • MyEclipse 8.0 GA 搭建 Struts2 + Spring2 + Hibernate3 (测试)
  • node-sass 安装卡在 node scripts/install.js 解决办法
  • PHP 程序员也能做的 Java 开发 30分钟使用 netty 轻松打造一个高性能 websocket 服务...
  • Spark VS Hadoop:两大大数据分析系统深度解读
  • WinRAR存在严重的安全漏洞影响5亿用户
  • 闭包,sync使用细节
  • 构造函数(constructor)与原型链(prototype)关系
  • 什么是Javascript函数节流?
  • 想写好前端,先练好内功
  • 学习使用ExpressJS 4.0中的新Router
  • Spring第一个helloWorld
  • ​比特币大跌的 2 个原因
  • # Java NIO(一)FileChannel
  • $ git push -u origin master 推送到远程库出错
  • $L^p$ 调和函数恒为零
  • (02)vite环境变量配置
  • (2)关于RabbitMq 的 Topic Exchange 主题交换机
  • (day6) 319. 灯泡开关
  • (iPhone/iPad开发)在UIWebView中自定义菜单栏
  • (Redis使用系列) Springboot 实现Redis消息的订阅与分布 四
  • (WSI分类)WSI分类文献小综述 2024
  • (二)c52学习之旅-简单了解单片机
  • (分布式缓存)Redis哨兵
  • (十三)Java springcloud B2B2C o2o多用户商城 springcloud架构 - SSO单点登录之OAuth2.0 根据token获取用户信息(4)...
  • (转)linux 命令大全
  • ..回顾17,展望18
  • .bat批处理(八):各种形式的变量%0、%i、%%i、var、%var%、!var!的含义和区别
  • .NET Core 和 .NET Framework 中的 MEF2
  • .net Stream篇(六)
  • .Net 路由处理厉害了
  • .net/c# memcached 获取所有缓存键(keys)
  • .Net的C#语言取月份数值对应的MonthName值
  • [ Linux 长征路第五篇 ] make/Makefile Linux项目自动化创建工具
  • [ vulhub漏洞复现篇 ] AppWeb认证绕过漏洞(CVE-2018-8715)
  • [AHOI2009]中国象棋 DP,递推,组合数