2017年10月25笔记
来源:互联网 发布:mac fontawesome 字体 编辑:程序博客网 时间:2024/06/15 11:38
Centos7安装 gcc编译器 http://blog.csdn.net/gw85047034/article/details/52957516
Centos7配置yum源 http://blog.csdn.net/lcj200813138020/article/details/46914161
http://www.ttlsa.com/web/let-infotify-rsync-fast/ inotify+rsync同步方案
inotify的使用 http://blog.csdn.net/god_wot/article/details/50448814
- 可取之处为使用脚本
[root@iZ25w1kdi5zZ scripts]# vi inotify_start.sh
/usr/local/inotify/bin/inotifywait -mrq -e modify,create,move,delete \ -m:monitor r:recursive q:quiet e:events
--fromfile '/opt/scripts/ffile' \ 意为监控ffile下面的目录 ffile中内容为 /root
--timefmt '%y-%m-%d %H:%M' --format '%T %w %f %e' \ 生成的inotify.log的格式 17-10-25 17:31/root/test/dir/ dfile CREATE
--outfile '/tmp/rsync.log' 生成log位置inotify打印说明:
前提:对root目录下的文件和文件夹操作
[root@localhost ~]# vi /tmp/rsync.log
17-10-25 17:31 dfile CREATE
17-10-25 17:31 /root/test/dir/ dfile CREATE 可以具体到目标文件位置 这样在通过rsync来同步指定的文件就使rsync效率高多了
让程序在后台运行:
[root@localhost ~]# sh /opt/scripts/inotify_start.sh
^Z ----:让前台程序在停止
[1]+ Stopped sh /opt/scripts/inotify_start.sh
[root@localhost ~]# jobs -l ----:查看当前jobs
[1]+ 27978 Stopped sh /opt/scripts/inotify_start.sh
[root@localhost ~]# bg 1 ---:指定job号为1的进程在后台运行,相当于 &
[1]+ sh /opt/scripts/inotify_start.sh &
[root@localhost ~]# jobs -l
[1]+ 27978 Running sh /opt/scripts/inotify_start.sh &
[root@localhost ~]# fg 1 ---:调用后台进程在前台执行
sh /opt/scripts/inotify_start.sh
- 2017年10月25笔记
- 2017年10月11日笔记
- 2017年10月12日笔记
- 2017年10月12日笔记
- 2017年10月17日笔记
- 2017年10月26日笔记
- 2017年11月25日,技术笔记整理
- Python学习笔记2017年12月25日
- 2017年9月11日09:02:10笔记
- 向量内积–笔记2017年10月3日
- 2017年10月8日训练笔记
- 2017年10月9日数据结构课堂笔记
- 2017年10月12日训练笔记
- 2017年10月19日训练笔记
- 2017年10月站立会议旁观笔记
- 2017年10月22日训练笔记
- 2017年10月24日java笔记
- 2017年10月26日训练笔记
- 常用网站集锦
- 2017.10.25 模拟考试
- C语言字符串与数字之间的相互转换
- NLP01-python的wordcloud实现中文词云小例
- 如何成为优秀的程序员---转载
- 2017年10月25笔记
- Unicode其实是Latin1的扩展。只有一个低字节的Uncode字符其实就是Latin1字符——附各种字符编码表及转换表
- sysu-17B01签到
- HMM学习
- 永恒之蓝与Oacle RAC:Oracle不支持在心跳交换机上关闭任何端口
- react_basic(6)
- Python 操作MySQL数据库
- SwapBuffer驱动进阶(二)
- JS的tostring()和toLocaleString()的区别