Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to get some files from my ftp server from the command line. I am using wget to download the whole folder at once. The command is:

wget -m

But the problem is, my password contains the '@' symbol. Hence The command becomes

wget -m 

due to which, wget tries to resove as the host, which it is not able to. Please help!

share|improve this question
up vote 18 down vote accepted

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.


wget -m --ftp-user=username --ftp-password=foo@bar
share|improve this answer
nice. this works. thanks there! – roopunk Dec 22 '12 at 4:29
Logged in, to upvote. Thanks a ZILLION mate! – Karma May 30 '14 at 19:23

You can also URL encode the username and/or password. The @ symbol becomes %40

For example:

wget -m 

can be written as

wget -m 

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.)

share|improve this answer

wget -m --ftp-user=username --ftp-password=foo@bar

Creates folder "" and inside that folder is the file

share|improve this answer
You have syntax errors in your command. I also fail to understand how this is different, minus the syntax errors, from the answer Dennis submitted over 3 years ago. – Ramhound Apr 28 at 19:33
This duplicates another answer and adds no new content. Please don't post an answer unless you actually have something new to contribute. – DavidPostill May 17 at 9:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.