<< Reviews
>> Mail

Getting files from a FTP server

Things are easy for those who have access to the Internet and a program called FTP (File Transfer Program). Nearly all Unix computers have it, but not all of them allow the use of FTP.

FTP allows you to gain access to some other machines and store and/or retrieve files. Normally one needs an acoount on the remote machine to use it, bat a number of machines have a setup that allows everybody to log in as the user ftp or anonymous, so anybody may get files from them. The most important of this servers are the Aminet servers, which mirror each other and hence should have the same files. They are the best choice if you are looking for Amiga software. Aminet hosts are

USA (MO)     ftp.wustl.edu           128.252.135.4
USA (CA)     ftp.cdrom.com           192.153.46.2
USA (TX)     ftp.etsu.edu            192.43.199.20
Scandinavia  ftp.luth.se             130.240.18.2
Germany      ftp.uni-kl.de           131.246.9.95
Germany      ftp.uni-erlangen.de     131.188.1.43
Germany      ftp.cs.tu-berlin.de     130.149.17.7
Germany      ftp.uni-paderborn.de    131.234.2.32
Germany      ftp.uni-oldenburg.de    134.106.40.9
Germany      ftp.coli.uni-sb.de      134.96.68.11
Switzerland  ftp.eunet.ch            146.228.10.16
Switzerland  litamiga.epfl.ch        128.178.151.32
UK           ftp.doc.ic.ac.uk        146.169.2.1
All these mirrors have a directory `/pub/aminet', where you will find much stuff. Please use a mirror close to you! Some other important hosts are
ftp.funet.fi             (Finland)
ftp.isca.uiowa.edu       (USA)
ftp.hawaii.edu           (USA)
ftp.cso.uiuc.edu         (USA)
ftp.dfv.rwth-aachen.de   (Germany)
Note that grind, aachen and erlangen have the full collection of Fish disks available! See Where do I get Fish disk xxx?.

To connect to a special host (ftp.uni-erlangen.de for example), you should type

ftp ftp.uni-erlangen.de
The host answers by requesting your login. You should type
ftp
No you are asked for a password. Please type your Email address here, if you have one. If not, use the password ftp.

Now you're inside the host. There is a number of commands you may execute here. The most important are:

?
Prints the help text of the FTP command. Additionally you may type ? command to get information on a special command.
bin
Tells the FTP program that you whish to transfer binary files. It is always a good choice to type bin as the very first command! Files you load without the bin command can be corrupt.
get <file>
Loads the given file from the host. On most Unix machines you can type something like `get file.txt -' or `get file.txt |more' to show a text on the screen. Note that there must not be any blank between the | and the word more!
mget <pat>
Loads the given files. pat may contain Unix style like wildcards.
put <file>
mput <pat>
Like get and mget, but transfer files from you to the remote host. This is in most cases not allowed, except for a special directory called `incoming'. You can place files here which you want to make public.
cd <dir>
Like the usual cd command. The commands get, mget, put, mput, dir and ls refer to the current working directory.
dir [<dir>]
ls [<dir>]
Like `list' and `dir' on the Amiga. Note that the FTP-dir corresponds to the Amiga-list!
bye
Leaves the FTP program.

When you have used FTP for the first times you will notice, that you always begin with executing the same steps:

  1. Type the login (ftp in most cases)
  2. Type the password (your mail address in most cases)
  3. Enter the bin command
  4. Change the current working directory (`/pub/aminet' for example)
This may get executed automatically. What you need is a file called `.netrc' in your home directory. Note that it needs to be protected against others! The FTP program doesn't use it, if it can be read by anything else than you. (Protection is set using the command `chmod go-rwx .netrc'.) The .netrc file contains some entries for your most favourite FTP sites, each separated by empy lines. A typicel entry may look like this:
machine ftp.uni-erlangen.de
login ftp
password <your mail address> or <ftp>
macdef init
    bin
    cd pub/aminet
Note that on some machines it is possible to use the machine name `default' which meets all machines not listed in .netrc.



<< Reviews >> Mail