inotify工具安装配置
一、安装
1) 从内核和目录里面查看是否支持inotify
[root@nfs01 ~]# uname -r
2.6.32-573.el6.x86_64
[root@nfs01 ~]# ls -l /proc/sys/fs/inotify/ -→主要查看下面有没有三个目录
总用量 0
-rw-r--r-- 1 root root 0 1月 21 13:03 max_queued_events
-rw-r--r-- 1 root root 0 1月 21 13:03 max_user_instances
-rw-r--r-- 1 root root 0 1月 21 13:03 max_user_watches
2)检查是否有安装inotify 如果没有就安装
rpm -qa inotify-tools
没有就先安装epol源
yum.repos.d]# wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
之后安装
[root@nfs01 ~]# yum install inotify-tools -y
二、参数讲解、
[root@nfs01 ~]# which inotifywait
/usr/bin/inotifywait
[root@nfsserver inotify-tools]# bin/inotifywait —help
r :递归查询目录
q:打印很少的信息,仅仅打印监控事件的信息 安静状态
m:始终保持事件监听状态
excluder#排除文件或者目录的时候不区分大小写
timefmt:指定时间输出的格式
d :后台运行
-e: 事件 里面有很多方法
下面是事件参数
Events:
access file or directory contents were read 访问
modify file or directory contents were written 修改
attrib file or directory attributes changed 属性发生变化
close_write file or directory closed, after being opened in 写入之后关闭
writeable mode
close_nowrite file or directory closed, after being opened in
read-only mode
close file or directory closed, regardless of read/write mode
open file or directory opened
moved_to file or directory moved to watched directory 移动到哪里
moved_from file or directory moved from watched directory
move file or directory moved to or from watched directory
create file or directory created within watched directory
delete file or directory deleted within watched directory
delete_self file or directory was deleted
unmount file system containing file or directory unmounted卸载
之后就可以和nfs共享服务器之间的实时备份
inotify工具安装配置的更多相关文章
- Linux系统inotify工具安装配置
inotify主要功能 Inotify 是一个 Linux特性,它监控文件系统操作,比如读取.写入和创建.Inotify 反应灵敏,用法非常简单,并且比 cron 任务的繁忙轮询高效得多.学习如何将 ...
- Oracle 客户端安装 + pl/sql工具安装配置
Oracle 客户端安装 + pl/sql工具安装配置 下载oracle客户端,并在本地安装. 11g下载地址为: http://www.oracle.com/technetwork/databas ...
- Java开发环境及工具安装配置
Java开发环境及工具安装配置 Windows JDK 下载地址 https://www.oracle.com/java/technologies/javase-downloads.html 安装配置 ...
- 自动化运维工具-mussh工具安装配置及简单使用讲解
1.先决条件: 安装pssh工具的主机针对远程主机需要配置免秘钥认证: ssh-keygen -t rsa ssh-copy-id [remotehost] 2.下载mussh工具安装介质: http ...
- 自动化运维工具-pdsh工具安装配置及简单使用讲解
1.先决条件: 安装pssh工具的主机针对远程主机需要配置免秘钥认证: ssh-keygen -t rsa ssh-copy-id [remotehost] 2.下载pssh工具安装介质: https ...
- 自动化运维工具-pssh工具安装配置及简单使用讲解
1.先决条件:安装pssh工具要求python版本大于2.4即可. 安装pssh工具的主机针对远程主机需要配置免秘钥认证: ssh-keygen -t rsa ssh-copy-id [remoteh ...
- 博客图片上传picgo工具安装配置github图传使用
摘要 对于每一个写博客的人来说,图片是至关重要.这一路经历了多次图片的烦恼,之前选择了微博个人文章那里粘贴图片的方式上传,感觉也挺方便的.但是由于新浪的图片显示问题,如果header中不设置 标签就不 ...
- java初级开发一系列的工具安装配置
最近压力很大,刚刚帮朋友安装了一整套环境,按照印象写下此篇记录(没有图解),一是用来释放压力,二来希望可以帮到各位. 一.首先,Eclipse的安装,下载eclipse压缩包,一般为200~300M, ...
- inotify+rsync安装配置
环境 系统 IP地址 主服务器 CentOS7.4 192.168.1.1 备份服务器 CentOS7.4 192.168.1.2 一.备份服务器 安装rsync(备) wget https://rs ...
随机推荐
- 使用Pangolon在同一副图中,画出两个轨迹,比较误差
使用 code/ground-truth.txt 和 code/estimate.txt 两条轨迹.请你根据上面公式,实现 RMSE的计算代码,给出最后的 RMSE 结果.作为验算,参考答案为:2.2 ...
- CCCC L2-020. 功夫传人 搜索 bfs && 精度+ 特判
https://www.patest.cn/contests/gplt/L2-020 题解:给你一颗树,让你遍历一遍,顺便更新一下数据,每次到根节点时将其对应的数据加到ans上面.这里用的bfs. 坑 ...
- CVPixelBuffer
https://www.cnblogs.com/psklf/p/7700834.html https://stackoverflow.com/questions/16475737/convert-ui ...
- iOS电话等中断事件的开始和结束通知
#import "ViewController.h" #import <AVFoundation/AVFoundation.h> @interface ViewCont ...
- JPA 解析
看图想想相关的架构 1.查询表达式中的接口层次结构 2.CriteriaQuery 封装了传统查询的子句 3.Metamodel API 中的持久化类型的接口的层次结构 4. Metamodel AP ...
- crawlspider爬虫:定义url规则
spider爬虫,适合meta传参的爬虫(列表页,详情页都有数据要爬取的时候) crawlspider爬虫,适合不用meta传参的爬虫 scrapy genspider -t crawl it it. ...
- mysql 权限管理 对所有库 所有表 授权 *.*
对miek这个账号localhost 授予了所有库,所表的select权限 mysql> grant select on *.* to 'mike'@'localhost'; Query OK, ...
- 【剑指offer】旋转数组的最小数字
一.题目: 把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转. 输入一个非减排序的数组的一个旋转,输出旋转数组的最小元素. 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个 ...
- [py][mx]django注册-邮件激活
人生,学习,就是一段旅途, 说是放弃,其实是自信心作祟. 因为不同时间段状态,譬如晚上和早上刚来状态不一样.做相同事情容器失去自信而放弃. 坚持可以打破这个魔咒 还有就是有些问题得分割, 不要让压死牛 ...
- 使用POI读取/创建Execl(.xlsx)文件
最近项目中用到了解析Execl表格的功能,在网上百度了一下自己写了一个小Demo.由于项目中使用的是Execl2007,就是后缀为.xlsx的,所以只研究了解析和创建Execl2007的文件,解析Ex ...