nixnub
nixnub

Reputation: 669

In a *nix shell, how can I connect to another server's FTP and download a file?

On server1, I have a file in /home/example.zip. On server2, I need to basically do the equivalent of:

wget http://server1.com/example.zip

But of course via ftp. I of course have the username/password/host name.

How can this be achieved?

Upvotes: 0

Views: 178

Answers (3)

Andrew Keith
Andrew Keith

Reputation: 7563

You can wget a ftp file.

For example:

wget ftp://gnjilux.cc.fer.hr/welcome.msg

Upvotes: 0

tangens
tangens

Reputation: 39733

The man page of wget says:

--ftp-user=username
--ftp-password=password

So you can do it like this:

wget --ftp-user=xxxx --ftp-password=yyyy ftp://gnjilux.cc.fer.hr/welcome.msg

Upvotes: 4

rwilliams
rwilliams

Reputation: 21487

Try this

wget ftp://username:[email protected]/example.zip

Upvotes: 0

Related Questions