我尝试在我的 PC 上的 webdav 文件夹(box 帐户)上同步本地文件夹的 pdf 文件。我用 : 安装了那个文件夹davs://dav.box.com/dav。我在 ubuntu 14.04
rsync -avu --include="*/" --include="*.pdf" --exclude="*" L2/ /run/user/1000/gvfs/dav:host=dav.box.com,ssl=true/dav/Cours/
Run Code Online (Sandbox Code Playgroud)
上面的 rsync 命令在 webdav 文件夹中创建了目录树,但它不复制任何文件。
我有很多:
rsync: failed to set times on "/run/user/1000/gvfs/dav:host=dav.box.com,ssl=true/dav/Cours/SymCristalline": Operation not supported (95)
rsync: failed to set times on "/run/user/1000/gvfs/dav:host=dav.box.com,ssl=true/dav/Cours/SymCristalline/Cours": Operation not supported (95)
...
Run Code Online (Sandbox Code Playgroud)
然后我得到了我想要同步的文件列表。
SymCristalline/
SymCristalline/TD_2013.pdf
SymCristalline/blanche.pdf
SymCristalline/inter_tables_of_crist__vol_a.pdf
SymCristalline/inter_tables_of_crist__vol_d.pdf
....
Run Code Online (Sandbox Code Playgroud)
然后我得到了很多
rsync: mkstemp "/run/user/1000/gvfs/dav:host=dav.box.com,ssl=true/dav/Cours/SymCristalline/.TD_2013.pdf.tgEY8n" failed: Operation not supported (95)
rsync: mkstemp "/run/user/1000/gvfs/dav:host=dav.box.com,ssl=true/dav/Cours/SymCristalline/.blanche.pdf.tZ2XyK" failed: Operation not supported (95)
....
Run Code Online (Sandbox Code Playgroud)
最后:
sent 93,577,889 bytes received 38,505 bytes 20,577.29 bytes/sec
total size is 93,541,542 speedup is 1.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]
Run Code Online (Sandbox Code Playgroud)
最后,在 webdav 文件夹中,有所有目录但没有任何文件。