FTP on Demand

You know it: If you want to load down a big file from a distant server (overseas perhaps), the maximum transfer rate can not be reached. If you are using ISDN it is extreme. But you have no ISDN Port to spend the telecom union your money, and you use the best operating system in the world :-) People who can access the Internet via a university and send some Unix commands to it, can do something.

Theory

But how? The trick is to load the file not directly, but let the provider do it for you. After some time you can load the desired file from the provider without wasting time - the connection to your provider most times is so fast that you reach the maximum transfer rate. Unix knows the command nohup which allows a command execution without being logged in - this is the trick. You can log in at your provider and type in:
  provider:# nohup ftp -i ftp.leo.org &
  provider:# exit
  connection closed by foreign host.
  root:# _
This takes only a few seconds, only one tariff unit is lost for a good purpose.

But you have to do some prework, because ftp is an interactive program, which needs a lot of information for its work (e.g. what to load). You can tell ftp how to be less interactive by giving the option "-i". But you need to tell ftp the information what to do, and this happens if you create a file .netrc at your provider. (The option "-n" tells ftp to ignore this file.)

If you want, for example, load down the Linux kernel 2.0.7 from the LEO.ORG server (more than 5 Megabytes!) the file .netrc could look like:

provider:~/.netrc
  machine ftp.leo.org
  login anonymous
  password <my@email.address>
  macdef init
    lcd /usr/src
    cd /pub/comp/os/linux/Linus/v2.0
    bin
    get linux-2.0.7.tar.gz
    close
    quit
So cou could create an entry for each server you want to connect. This file must be stored in your directory at your provider before you call the nohup ftp command. One hour later you can load down directly your kernel. Great, isn't it? So kann man sich für jeden Server einen Eintrag machen. Diese Datei muß vor dem nohup ftp im Heimatverzeichnis beim Provider abgelegt werden. Eine Stunde später kann man sich den Kernel mit Höchstgeschwindigkeit beim Provider abholen. Schön, gell?

Automotion

Ok now. Now we want to do it automatically. Of course we need the cron again, which will do the data transfer in the cheap night hours.

... But this is not finished yet. Please wait...


Copyright © (GPL V 2) 1996 Bernhard Hailer
Last modification: 31-Aug-96 BeH