如何指定带有特殊字符的标签/路径为 'ñ'在 /etc/fstab 中?
我知道如果路径有空格,可以用 \040 对其进行编码:
路径示例:
“//服务器/带有空格的文件夹”
fstab 条目:
//server/folder\040with\040spaces /mnt/share/folder_local cifs nofail,credentials=/root/.credfile 0 0
但是如果路径中包含非英文字符如 'ñ',如何填充 fstab?
路径示例:
“//server/folderWith-ñ-char”
我尝试过:
fstab 条目:
//server/folderWith-\F1-char /mnt/share/folder_local cifs nofail,credentials=/root/.credfile 0 0
基于: https://www.degraeve.com/reference/urlencoding.php
但我明白错误:
mount -a
mount error(2): No such file or directory
I know that if a path has spaces one can encode it with \040:
Example for path:
"//server/folder with spaces"
fstab entry:
//server/folder\040with\040spaces /mnt/share/folder_local cifs nofail,credentials=/root/.credfile 0 0
But how to fill fstab if you have a path with non-English chars as 'ñ'?
Path example:
"//server/folderWith-ñ-char"
I've tried:
fstab entry:
//server/folderWith-\F1-char /mnt/share/folder_local cifs nofail,credentials=/root/.credfile 0 0
based on:
https://www.degraeve.com/reference/urlencoding.php
but I get the error:
mount -a
mount error(2): No such file or directory
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需输入
//server/folderWith-ñ-char
,ñ
并不特殊。如果出现问题,您可以使用 linux-util 中的
mnt_mangle
。编译这个短程序:然后你可以使用:
Just type
//server/folderWith-ñ-char
,ñ
is not anyhow special.In case of problems, you can use
mnt_mangle
from linux-util. Compile this short program:Then you can use: