Skip to content

Commit 46800ba

Browse files
committed
linux: rsync 同步示例
1 parent 48b36a6 commit 46800ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

memo/memo.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,10 @@ Linux(centos/ubuntu)
455455
tar zxvf FileName.tar.gz # 解压
456456
tar zcvf FileName.tar.gz DirName # 压缩
457457
458+
# 监控文件变动并且自动增量同步本地文件到服务器对应文件夹(需要先安装 when-changed)
459+
when-changed -r -v -1 . rsync -avh --exclude='.git/' --exclude='mydoc/' --exclude='output/' /Users/pegasus/work/code/ XXX@ip:/home/pegasus/work/code/
460+
461+
458462
代码搜索用ag(the silversearcher)/rg, 比ack快
459463
460464
.. code-block:: python

0 commit comments

Comments
 (0)