wget for ftp using a password containing @
Rather than the user:pass@hostname
syntax, use switches. From wget --help
:
--ftp-user=USER set ftp user to USER.
--ftp-password=PASS set ftp password to PASS.
Example:
wget -m --ftp-user=username --ftp-password=foo@bar ftp://ftp.hostname.com/file
You can also URL encode the username and/or password. The @
symbol becomes %40
For example:
wget -m ftp://username:foo@[email protected]:/..
can be written as
wget -m ftp://username:foo%[email protected]:/..
I realize this question has been solved long ago, but I saw this in the corner of my eye and thought I'd throw in a solution (this is actually useful, because it should work with anything that uses or supports using URIs, such as FileZilla or a web browser.)