Linux curlftpfs password with characters

I want to install an FTP drive, but my FTP password contains "?!".

I enter the command:

curlftpfs myaccount: mypassword?!@thefptserver.com 

but it gives me "bash: !@theftpsever.com : event not found"

How to avoid these characters?

+6
source share
2 answers

Paste it in single quotes:

 curlftpfs 'myaccount: mypassword?!@thefptserver.com ' 

As you find out, the exclamation mark has special meaning in bash : !@thefptserver.com means the latest command that started with @thefptserver.com .

+6
source

Bash is looking for the latest team starting with @theftpsever.com in your history. This is called "Expanding Stories" and can be really helpful. In this case, of course, this is not so.

You can escape ! using a backslash, but it’s more common to use single quotes to stop a shell attempt:

 curlftpfs 'myaccount: mypassword?!@thefptserver.com ' 
+1
source

Source: https://habr.com/ru/post/906579/


All Articles