G'Day,
我正在使用rsync递归同步如下所示的远程文件夹树:
/folderA/a1/cache
/folderA/a1/cache/A1
/folderA/a1/cache/A2
/folderA/a1/somefolder
/folderA/a1/someotherfolder
/folderA/a2/somefolder/cache
/folderB/cache/
/folderB/b1/somefolder/cache
/folderB/b1/somefolder/yetanotherfolder/cache
/folderB/b1/somefolder/yetanotherfolder/cache/B1
/folderB/b1/somefolder/yetanotherfolder/cache/B2
我不知道文件夹树会是什么样,它会随着时间变化。所以我想要做的是递归地rsync上面的内容,但不包括文件夹“ cache”及其包含的任何子文件夹,这样我最终就可以同步了:
/folderA/a1
/folderA/a1/somefolder
/folderA/a1/someotherfolder
/folderA/a2/somefolder
/folderB/
/folderB/b1/somefolder
/folderB/b1/somefolder/yetanotherfolder/
有什么建议么?
另请参见rsync过滤器教程。
—
吉尔(Gilles)“所以,别再邪恶了”,