tags:

views:

2669

answers:

2

How can I run this on linux command line when my username has an @ sign in the middle?

ftp -u user:password@host/destination_folder/ sourcefile.txt

My username is "[email protected]" and it thinks my host is "domain.com".

I am stuck and cannot google my way out. Any help greatly appreciated.

NOTE: This is an unattended upload, so I can't just type in the username and password.

+3  A: 

Try define the account in a .netrc file. Check "man netrc" for details.

marcog
Both answers are right, but I gave it to pts because his was easier. Thanks for the answer!
bentford
+3  A: 

Do the unattended upload with curl instead of ftp:

curl -u user:password -T file ftp://server/dir/file
pts
-1 not because it is wrong, but it does not help him with his problem - just gives an alternative. If it is not impossible to do what he wants with what he wants, why should he change the tool?
BeowulfOF