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?
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?
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]'
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
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
.