Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

How can I write ftp command for a file transfer from one server to other with a simple script?

share|improve this question
You mean transferring files directly between server1 and server2 while controlling the transfer from client3? – peterph Mar 22 '13 at 14:02
No, to transfer files from server-1 to server-2, while controlling from server-1. – Swagatika Mar 25 '13 at 7:40
up vote 0 down vote accepted

lftp (and a lot of other ftp clients) will let you specify username, password, and the series of commands to issue with its command line. man lftp for more details.

share|improve this answer

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.