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 info@domain.com
and it thinks my host is domain.com
.
NOTE: This is an unattended upload, so I can't just type in the username and password.
As an alternative, if you don't want to create config files (or you don't want to rely on the behavior of the system-specific ftp command), do the unattended upload with curl
instead of ftp
:
curl -u user:password -T file ftp://server/dir/file
If you don't want ps
(process list) to show the password passed to curl for security reasons, see answers to this question.