我有一个这样的文件夹
/
config.js
/lib
/project
config.js
在根目录中执行 rsync
rsync -azvr --exclude config.js --include lib/project/config.js . dest
与/lib/project/config.js
目标不同步,如何解决这个问题?
答案1
您需要重新排序您的include/exclude
参数
# rsync -azvr --include lib/project/config.js --exclude config.js . dest
sending incremental file list
./
lib/
lib/project/
lib/project/config.js
反而
# rsync -azvr --exclude config.js --include lib/project/config.js . dest
sending incremental file list
./
lib/
lib/project/
sent 73 bytes received 23 bytes 192.00 bytes/sec