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 ...
随机推荐
- mysql跨库联表查询
首先要了解database与instance区别,见<MySQL中的实例.数据库关系简介> 跨库分为同一个instance下的跨库和不同instance下的跨库. 一.同一个MySQL实例 ...
- 2018牛客网暑期ACM多校训练营(第二场) J - farm - [随机数哈希+二维树状数组]
题目链接:https://www.nowcoder.com/acm/contest/140/J 时间限制:C/C++ 4秒,其他语言8秒 空间限制:C/C++ 262144K,其他语言524288K ...
- python面向对象高级:定制类
Python的class中还有许多这样有特殊用途的函数,可以帮助我们定制类. 比如: __str__ 与__repr____iter____getitem____call__ __str__ 与__r ...
- docker daemon configuration
于 Docker的分层镜像,除了 aufs,docker还支持btrfs, devicemapper和vfs,你可以使用 -s 或 –storage-driver= 选项来指定相关的镜像存储.在Ubu ...
- 币安Binance API Websocket
本文介绍币安Binance API Websocket General WSS information The base endpoint is: wss://stream.binance.com:9 ...
- HIVE表保存的路径
HIVE表保存的默认路径在${HIVE_HOME}/conf/hive-site.xml配置文件的hive.metastore.warehouse.dir属性指定
- IO流(9)复制指定文件夹下指定文件到目的文件夹,并改名
import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.File;import ja ...
- Domino代理运行问题
当Server出现“operation is disallowed in this session”此命令时为代理权限问题,修改后即可正常运行代理.
- Python中的__init__.py的作用
当用 import 导入该目录时,会执行 __init__.py 里面的代码 因此在__init__.py文件中,把深层的包的路径缩短,别的地方就可以在引用到目录级别时引到深层的包.
- glide从入门到精通使用
介绍 不论是开发Java还是你正在学习的Golang,都会遇到依赖管理问题.Java有牛逼轰轰的Maven和Gradle. Golang亦有godep.govendor.glide.gvt.gopac ...