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 ...
 
随机推荐
- Oracle体系结构之Oracle基本数据字典:v$database、v$instance、v$version、dba_objects
			
v$database: 视图结构: SQL> desc v$database; Name Null? Type - ...
 - w_scripting_language
			
https://en.wikipedia.org/wiki/Scripting_language A scripting or script language is a programming lan ...
 - 四种数据库随机获取N条数据的方法
			
1.SQL Server: SELECT TOP n * FROM tableName ORDER BY NEWID(); 2.ORACLE: SELECT * FROM (SELECT * ...
 - 2018/03/10 每日一个Linux命令 之 cksum
			
每日一个Linux命令 2018-03-10 Linux 命令 cksum cksum [文件] 今天楼下的一个大妈去世了,不仅感叹,现如今,真的和以前不一样了,楼上楼下都不知道住的是谁? cksu ...
 - sublime text3控制台每次报错会显示几行[ ]
			
如下图所示,每次编译报错的时候会显示: 我只需要报错信息,不想红框中的信息出现. 解决方案: 1 找到sublime Text3安装路径下的Default.sublime-package,如~Subl ...
 - Android内存泄漏的本质原因、解决办法、操作实例
			
今年最后一个迭代终于结束了,把过程中碰到的不熟悉的东西拉出来学习总结一下 内存泄漏的本质是:[一个(巨大的)短生命周期对象的引用被一个长生命周期(异步生命周期)的对象持有] 这个东西分为两个部 ...
 - Python模块:配置文件解析器configparser
			
版权声明:本文为博主皮皮http://blog.csdn.net/pipisorry原创文章,未经博主同意不得转载. https://blog.csdn.net/pipisorry/article/d ...
 - .NET Core 2.0 官方下载地址及中文教程
			
开发.net core 应用需要安装.NET Core 2.0 SDK http://www.microsoft.com/net/download/core#/sdk 电脑上运行 .net core ...
 - 加密货币 (Cryptocurrency) 市值 (market capitalization) 列表
			
https://coinmarketcap.com/all/views/all/ ico 列表 https://www.icoalert.com/?q=&is_v=1 https://www. ...
 - postman 安装,对elasticsearch进行请求
			
1 使用postman对elasticsearch进行测试 :下载插件: https://www.getpostman.com/apps ,下载时exe文件,双击自动安装,首次打开注册.下面就可以使 ...