linux curftpfs,带符号的密码

发布于 2024-12-28 10:58:17 字数 445 浏览 0 评论 0原文

我想挂载 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

凉城凉梦凉人心 2025-01-04 10:58:17

将其用单引号括起来:

curlftpfs 'myaccount:[email protected]'

正如您所发现的,感叹号在 bash 中具有特殊含义:[email protected] 代表以 @thefptserver.com 开头的最新命令。

Enclose it in single quotes:

curlftpfs 'myaccount:[email protected]'

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.

你不是我要的菜∠ 2025-01-04 10:58:17

您可以使用下面的用户选项将用户和密码与 FTP URL/IP 分开:

curlftpfs -o user='myaccount:mypassword?!' thefptserver.com

我在 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:

curlftpfs -o user='myaccount:mypassword?!' thefptserver.com

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

夜无邪 2025-01-04 10:58:17

Bash 正在查找历史记录中以 @theftpsever.com 开头的最新命令。这称为“历史扩展”真的很有用。在这种情况下,当然不是。

您可以使用反斜杠转义 !,但更常见的是使用单引号来阻止 shell 尝试执行此操作:

curlftpfs 'myaccount:[email protected]'

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:

curlftpfs 'myaccount:[email protected]'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文