一、安装

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工具安装配置的更多相关文章

  1. Linux系统inotify工具安装配置

    inotify主要功能 Inotify 是一个 Linux特性,它监控文件系统操作,比如读取.写入和创建.Inotify 反应灵敏,用法非常简单,并且比 cron 任务的繁忙轮询高效得多.学习如何将 ...

  2. Oracle 客户端安装 + pl/sql工具安装配置

    Oracle 客户端安装 +  pl/sql工具安装配置 下载oracle客户端,并在本地安装. 11g下载地址为: http://www.oracle.com/technetwork/databas ...

  3. Java开发环境及工具安装配置

    Java开发环境及工具安装配置 Windows JDK 下载地址 https://www.oracle.com/java/technologies/javase-downloads.html 安装配置 ...

  4. 自动化运维工具-mussh工具安装配置及简单使用讲解

    1.先决条件: 安装pssh工具的主机针对远程主机需要配置免秘钥认证: ssh-keygen -t rsa ssh-copy-id [remotehost] 2.下载mussh工具安装介质: http ...

  5. 自动化运维工具-pdsh工具安装配置及简单使用讲解

    1.先决条件: 安装pssh工具的主机针对远程主机需要配置免秘钥认证: ssh-keygen -t rsa ssh-copy-id [remotehost] 2.下载pssh工具安装介质: https ...

  6. 自动化运维工具-pssh工具安装配置及简单使用讲解

    1.先决条件:安装pssh工具要求python版本大于2.4即可. 安装pssh工具的主机针对远程主机需要配置免秘钥认证: ssh-keygen -t rsa ssh-copy-id [remoteh ...

  7. 博客图片上传picgo工具安装配置github图传使用

    摘要 对于每一个写博客的人来说,图片是至关重要.这一路经历了多次图片的烦恼,之前选择了微博个人文章那里粘贴图片的方式上传,感觉也挺方便的.但是由于新浪的图片显示问题,如果header中不设置 标签就不 ...

  8. java初级开发一系列的工具安装配置

    最近压力很大,刚刚帮朋友安装了一整套环境,按照印象写下此篇记录(没有图解),一是用来释放压力,二来希望可以帮到各位. 一.首先,Eclipse的安装,下载eclipse压缩包,一般为200~300M, ...

  9. inotify+rsync安装配置

    环境 系统 IP地址 主服务器 CentOS7.4 192.168.1.1 备份服务器 CentOS7.4 192.168.1.2 一.备份服务器 安装rsync(备) wget https://rs ...

随机推荐

  1. Linux:file命令显示自定义文件类型

    file 命令可以查看文件类型信息,原理见: 非常Linux-file命令与magic file 修改 /ect/magic 文件后,可用 file 命令显示自定义文件类型信息. man magic ...

  2. ldapsearch使用

    参数 用途 -? 打印关于使用 ldapsearch 的帮助. -a deref 指定别名反向引用.请输入 never.always.search 或 find.如果不使用此参数,缺省为 never. ...

  3. 6.2.3 Property Access Errors

    JavaScript: The Definitive Guide, Sixth Edition by David Flanagan   Property access expressions do n ...

  4. flask 小入门知识点 2018.12.19

    今天听得一脸懵逼,主要因为自己英文底子太差了 不耽误时间了,少总结下,开始复习... 代码: # -*- encoding: utf-8 -*- # 导入重定向模块 , url_for简易寻址跳转,j ...

  5. RSA加密常用的填充方式 以及 常见错误

    一.RSA加密常用的填充方式 1.RSA_PKCS1_PADDING 输入:比 RSA modulus 短至少11个字节.如果输入的明文过长,必须切割,然后填充 输出:和modulus一样长 根据这个 ...

  6. 【Pyton】【小甲鱼】类和对象:一些相关的BIF(内置函数)

    1.issubclass(class,classinfo) 1)一个类被认为是其自身的子类 2)classinfo可以使类对象组成的元祖,只要class与其中任何一个候选类的子类,则返回True. & ...

  7. sql server字符串中怎么添加换行?

    换行/回车,可以使用CHAR函数处理,比如: 1 insert into tbtest (text) values ('abc' + char(13)+char(10) + 'def') 主要还是要看 ...

  8. android ImageView加圆角

    1.attrs添加 <declare-styleable name="RoundImageView"> <attr name="circle" ...

  9. ul li剧中对齐

    html: <div class="footernav"> <ul> <li>首页</li> <li>文章</li ...

  10. Jedis 对 Redis 的操作详解

    1. JedisUtil2. 键操作3. 字符串操作4. 字节串4. 整数和浮点数5. 列表6. 集合(Set)7. 散列8. 排序sort 本篇主要阐述Jedis对redis的五大类型的操作:字符串 ...