linux curftpfs,带符号的密码
我想挂载 FTP 驱动器,但我的 FTP 密码包含“?!”。
我输入命令:
curlftpfs myaccount:[email protected]
但它给了我“bash: [email protected] :未找到事件”
如何转义这些字符?
I want to mount an FTP drive, but my FTP password contains "?!".
I enter the command:
curlftpfs myaccount:[email protected]
but it gives me "bash: [email protected]: event not found"
How do I escape those characters?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将其用单引号括起来:
正如您所发现的,感叹号在
bash
中具有特殊含义:[email protected]
代表以@thefptserver.com
开头的最新命令。Enclose it in single quotes:
As you've discovered, the exclamation mark has a special meaning in
bash
:[email protected]
stands for the most recent command that started with@thefptserver.com
.您可以使用下面的用户选项将用户和密码与 FTP URL/IP 分开:
我在 curlftpfs 手册中找到了此选项,希望它有所帮助!
在此链接中也找到了相同的答案 https://superuser.com/ questions/269006/curlftpfs-doesnt-work-for-a-username-with-a
You can separate user and password from FTP URL/IP using user option below:
I found this option in curlftpfs manual and hope it helps!
Also found the same answer in this link https://superuser.com/questions/269006/curlftpfs-doesnt-work-for-a-username-with-a
Bash 正在查找历史记录中以
@theftpsever.com
开头的最新命令。这称为“历史扩展” 和真的很有用。在这种情况下,当然不是。您可以使用反斜杠转义
!
,但更常见的是使用单引号来阻止 shell 尝试执行此操作:Bash is looking for the most recent command starting with
@theftpsever.com
in your history. This is called "History expansion" and can be really useful. In this case, of course, it is not.You can escape the
!
using a backslash, but it's more usual to use single quotes to stop your shell trying to do this: