码迷,mamicode.com
首页 > 其他好文 > 详细

效率工具(fswatch,rsync)

时间:2019-02-11 21:30:54      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:stack   repos   notify   over   man   工具   ado   family   epo   

mac 安装 brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
 
brew install fswatch
 
% cat fswatch_code.sh
#scp -i mengmai.pem -r /Users/yao.yao/Downloads/repos/ hadoop@ec2-13-233-83-154.ap-south-1.compute.amazonaws.com:/mnt/yaoyao/repos/
file_path=$1
relative_path=${file_path:31} # len(‘/Users/yao.yao/Downloads/repos/‘)=31
echo `date` "rsync code:" ${file_path}

# remote
rsync -ru -e "ssh -i mengmai.pem" /Users/yao.yao/Downloads/repos/${relative_path} hadoop@ec2-13-233-83-154.ap-south-1.compute.amazonaws.com:/mnt/yaoyao/repos/${relative_path}

echo `date` "rsync code done:" ${file_path}
 
运行:
nohup sh fswatch_code.sh > fswatch.out &

效率工具(fswatch,rsync)

标签:stack   repos   notify   over   man   工具   ado   family   epo   

原文地址:https://www.cnblogs.com/yaoyaohust/p/10363162.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!