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 ...
随机推荐
- HDU 1686 - Oulipo - [KMP模板题]
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1686 Time Limit: 3000/1000 MS (Java/Others) Memory Li ...
- 采用jquery同django实现ajax通信
在网页访问中通过HTTP协议中的get/post文件发送数据或请求.在浏览器中输入url后,浏览器就会帮助我们完成请求的发送和返回,并刷新更新界面.但是,如果我们不想更新界面,仅仅是发送一个get/p ...
- oracle union 用法
[sql] view plaincopyprint?众所周知的几个结果集集合操作命令,今天详细地测试了一下,发现一些问题,记录备考. 假设我们有一个表Student,包括以下字段与数据: drop t ...
- Python json pickle 模块 区别
json 支持 str.list.dict.int.tuple 数据类型 pickle 支持Python所有里的所有数据类型 缺点: 只能在Python使用 总结: 1.JSON只能处理基本数据类型. ...
- python center() 函数
center Python center() 返回一个原字符串居中,并使用空格填充至长度 width 的新字符串.默认填充字符为空格. 语法 center()方法语法: str.center(widt ...
- 简单mysql常用命令
在命令行 输入 mysql -uroot -p123456 (-u账号 -p密码)登入mysql服务器 1.设置mysql密码set password for 'root'@'localhost' = ...
- mathType插入公式编号,及对公式编号的字体进行修改。调整公式上下间距。
一:插入 公式编号. 1:首先设置公式格式.点击 mathtype>insert number >format 2:有简单格式和 高级格式: https://we ...
- word使用
1:插入图片,显示不完整,需要>点击上方的段落,选择单倍行距 2:wps 可以直接右键选择保存文件中的图片 3:word中换行符的标识符为^p ,可以用来替换换行符. 4:使word中某一段背 ...
- ios 工作日志
1.设计模式 1.1 想用一个controllerK控制多个页面的切换 但是每一个页面必须要引用这个controller,这样才能控制进度, 所以必须是弱引用.controller必须被某一个实例强引 ...
- numpy排序(sort、argsort、lexsort、partition、sorted)
1.sort numpy.sort(a, axis=1, kind='quicksort', order=None) a :所需排序的数组 axis:数组排序时的基准,axis=0按行排列:axis= ...