Server Fault is a question and answer site for system and network administrators. 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

I am simply not a programming guy. I deal with networks. I need a script to copy files from a remote server(Linux) to another machine.I have only ftp access to the remote server. Files are generated daily but fetched twice a week. Can anyone help me out in this ????

share|improve this question

closed as not a real question by Sven, Zoredache, voretaq7 Jan 22 '13 at 23:42

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Where are you getting stuck? It us unlikely that you will be able to get someone to compose a script for you. But if you need help with a specific detail, then you should ask about that. You really haven't given anyone enough information to help you in a useful way. – Zoredache Jan 22 '13 at 23:25

You can use the ftp command in a bash script.
Since you don't provide much details, I'll just give you a link to a simple HowTo on using the ftp command in a bash script.

An example working script which fetches the file saved in the $FILE variable is this one:


quote USER $USER
get $FILE
exit 0

Note that you'll land in the folder that is set as ftphome for the user which you use to login to the remote server. If you have to change the directory, you can use cd dirname before get $FILE.

share|improve this answer

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