我无法访问通过webdav挂载且名称中包含空格的文件。 Webdav服务器是Zimbra 8.0.9。挂载系统是Ubuntu 18.04.01。
我该如何正确地转义空格?
sudo mount -t davfs https://server.com/dav/user1/ /home/user1/mount_point
user1@host:~$ ls -la mount_point/attachments/by-type/text/today/*
total 375
drwxr-xr-x 2 root root 176 Apr 17 20:35 .
drwxr-xr-x 6 root root 216 Apr 17 20:35 ..
-rw-r--r-- 1 root root 191068 Apr 17 14:58 'file with spaces.ics'
-rw-r--r-- 1 root root 191068 Apr 17 14:58 'file with spaces.ics' <-- really identical file name
-rw-r--r-- 1 root root 191068 Apr 17 14:58 'file with spaces.ics' <-- really identical file name
-rw-r--r-- 1 root root 1345 Apr 17 14:58 file_without_spaces.ics
-rw-r--r-- 1 root root 1345 Apr 17 14:58 file_without_spaces.ics <-- really identical file name
-rw-r--r-- 1 root root 1345 Apr 17 14:58 file_without_spaces.ics <-- really identical file name
user1@host:~$ cat mount_point/attachments/by-type/text/today/file\ with\ spaces.ics
cat: 'mount_point/attachments/by-type/text/today/file with spaces.ics': No such file or directory
user1@host:~$ cat "mount_point/attachments/by-type/text/today/file with spaces.ics"
cat: 'mount_point/attachments/by-type/text/today/file with spaces.ics': No such file or directory
user1@host:~$ cat "mount_point/attachments/by-type/text/today/'file with spaces.ics'"
cat: "mount_point/attachments/by-type/text/today/'file with spaces.ics'": No such file or directory
user1@host:~$ sudo tar -cf files.tar mount_point/attachments/by-type/text/today/
[sudo] password for user1:
tar: mount_point/attachments/by-type/text/today/file with spaces.ics: File removed before we read it
tar: mount_point/attachments/by-type/text/today/file with spaces.ics: File removed before we read it
tar: mount_point/attachments/by-type/text/today: file changed as we read it
没有空格的文件没问题:
user1@host:~$ cat mount_point/attachments/by-type/text/today/file_without_spaces.ics
[... file content ...]