fswatch rsync配置使用 实现远程与本地同步
2016-05-03 10:58
786 查看
贴一个脚本这个脚本是rsync远程同步使用的一个脚本
在mac下配合fswatch使用可以达到监控文件变化,然后进行远程同步的目的。
reference:
https://github.com/emcrisostomo/fswatch/wiki/How-to-Use-fswatch fswatch tutorial
https://segmentfault.com/a/1190000005053788 ->hello fswatch
http://os.51cto.com/art/201006/203217.htm -> rsync命令全解
http://c.biancheng.net/cpp/view/2739.html -> Shell特殊变量:shell $0,$#,$*,$@,$?,$$和命令行参数
http://suren1986.in/?tag=fswatch -> 监听fsevents事件自动同步文件夹
rsync -avz --progress --exclude .git /Users/piperck/Desktop/gogogo/x piperck@:/home/piperck/project
在mac下配合fswatch使用可以达到监控文件变化,然后进行远程同步的目的。
fswatch -o /Users/piperck/Desktop/gogogo/x | xargs -0 -n 1 -I {} rsync -avz --progress --exclude .git /Users/piperck/Desktop/gogogo/x piperck@ip:/home/piperck/project
reference:
https://github.com/emcrisostomo/fswatch/wiki/How-to-Use-fswatch fswatch tutorial
https://segmentfault.com/a/1190000005053788 ->hello fswatch
http://os.51cto.com/art/201006/203217.htm -> rsync命令全解
http://c.biancheng.net/cpp/view/2739.html -> Shell特殊变量:shell $0,$#,$*,$@,$?,$$和命令行参数
http://suren1986.in/?tag=fswatch -> 监听fsevents事件自动同步文件夹
相关文章推荐
- Java再学习-java集合(一)
- eclipse使用svn插件设置忽略文件的几种方式
- iOS7tableview下移
- NSDictionary中取出value的值赋给float型
- Ubuntu 安装有道词典
- Ubuntu 安装有道词典
- 第5章 基础构建模块
- android中listview setEmptyView()的使用
- 理解伪元素和伪类
- ERROR 1129 (00000) Host * is blocked because of many connection errors; unblock with ‘mysqlad解决
- 构建ASP.NET MVC5+EF6+EasyUI 1.4.3+Unity4.x注入的后台管理系统
- FluentData -Micro ORM with a fluent API that makes it simple to query a database
- 深入浅析Bootstrap列表组组件
- 【项目源码】- 【天气预报】模仿魅族系统天气预报android
- C++走向远洋——43(人数不定的工资类,动态分配内存与释放)
- java 多线程 CountDownLatch用法
- JavaScript 进阶学习 6 浏览器对象
- 通过共享内存进行进程间通信
- 每天一个linux命令(29):chgrp命令
- Swift—重写-备