Go to the previous, next section.

Anonymous FTP

FTP (File Transfer Protocol) is the primary method of transferring files over the Internet. On many systems, it's also the name of the program that implements the protocol. Given proper permission, it's possible to copy a file from a computer in South Africa to one in Los Angeles at very fast speeds (on the order of 5--10K per second). This normally requires either a user id on both systems or a special configuration set up by the system administrator(s).

There is a good way around this restriction--the anonymous FTP service. It essentially will let anyone in the world have access to a certain area of disk space in a non-threatening way. With this, people can make files publicly available with little hassle. Some systems have dedicated entire disks or even entire computers to maintaining extensive archives of source code and information. They include gatekeeper.dec.com (Digital), wuarchive.wustl.edu (Washington University in Saint Louis), and archive.cis.ohio-state.edu (The Ohio State University).

The process involves the "foreign" user (someone not on the system itself) creating an FTP connection and logging into the system as the user `anonymous', with an arbitrary password:

Name (foo.site.com:you): anonymous
Password: jm@south.america.org

Custom and netiquette dictate that people respond to the Password: query with an email address so that the sites can track the level of FTP usage, if they desire. (See section Email Addresses for information on email addresses).

invisible.xbm The speed of the transfer depends on the speed of the underlying link. A site that has a 9600bps SLIP connection will not get the same throughput as a system with a 56k leased line (see section The Physical Connection, for more on what kinds of connections can exist in a network). Also, the traffic of all other users on that link will affect performance. If there are thirty people all FTPing from one site simultaneously, the load on the system (in addition to the network connection) will degrade the overall throughput of the transfer.

FTP Etiquette

Lest we forget, the Internet is there for people to do work. People using the network and the systems on it are doing so for a purpose, whether it be research, development, whatever. Any heavy activity takes away from the overall performance of the network as a whole.

The effects of an FTP connection on a site and its link can vary; the general rule of thumb is that any extra traffic created detracts from the ability of that site's users to perform their tasks. To help be considerate of this, it's highly recommended that FTP sessions be held only after normal business hours for that site, preferably late at night. The possible effects of a large transfer will be less destructive at 2 a.m. than 2 p.m. Also, remember that if it's past dinner time in Maine, it's still early afternoon in California--think in terms of the current time at the site that's being visited, not of local time.

Basic Commands

While there have been many extensions to the various FTP clients out there, there is a de facto "standard" set that everyone expects to work. For more specific information, read the manual for your specific FTP program. This section will only skim the bare minimum of commands needed to operate an FTP session.

Creating the Connection

The actual command to use FTP will vary among operating systems; for the sake of clarity, we'll use `FTP' here, since it's the most general form.

invisible.xbm invisible.xbm There are two ways to connect to a system--using its hostname or its Internet number. Using the hostname is usually preferred. However, some sites aren't able to resolve hostnames properly, and have no alternative. We'll assume you're able to use hostnames for simplicity's sake. The form is

ftp somewhere.domain

See section Domains for help with reading and using domain names (in the example below, somewhere.domain is ftp.uu.net).

invisible.xbm You must first know the name of the system you want to connect to. We'll use `ftp.uu.net' as an example. On your system, type:

ftp ftp.uu.net
(the actual syntax will vary depending on the type of system the connection's being made from). It will pause momentarily then respond with the message
Connected to ftp.uu.net.

and an initial prompt will appear:

220 uunet FTP server (Version 5.100 Mon Feb 11 17:13:28 EST 1991) ready.
Name (ftp.uu.net:jm):

to which you should respond with anonymous:

220 uunet FTP server (Version 5.100 Mon Feb 11 17:13:28 EST 1991) ready.
Name (ftp.uu.net:jm): anonymous

The system will then prompt you for a password; as noted previously, a good response is your email address:

331 Guest login ok, send ident as password.
Password: jm@south.america.org
230 Guest login ok, access restrictions apply.
ftp>

The password itself will not echo. This is to protect a user's security when he or she is using a real account to FTP files between machines. Once you reach the ftp> prompt, you know you're logged in and ready to go.

dir

At the `ftp>' prompt, you can type a number of commands to perform various functions. One example is `dir'---it will list the files in the current directory. Continuing the example from above:

ftp> dir

200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 3116
drwxr-xr-x  2 7        21            512 Nov 21  1988 .forward
-rw-rw-r--  1 7        11              0 Jun 23  1988 .hushlogin
drwxrwxr-x  2 0        21            512 Jun  4  1990 Census
drwxrwxr-x  2 0        120           512 Jan  8 09:36 ClariNet
... @rm{etc etc} ...
-rw-rw-r--  1 7        14          42390 May 20 02:24 newthisweek.Z
... @rm{etc etc} ...
-rw-rw-r--  1 7        14        2018887 May 21 01:01 uumap.tar.Z
drwxrwxr-x  2 7        6            1024 May 11 10:58 uunet-info

226 Transfer complete.
5414 bytes received in 1.1 seconds (4.9 Kbytes/s)
ftp> 

The file `newthisweek.Z' was specifically included because we'll be using it later. Just for general information, it happens to be a listing of all of the files added to UUNET's archives during the past week.

The directory shown is on a machine running the Unix operating system--the dir command will produce different results on other operating systems (e.g. TOPS, VMS, et al.). Learning to recognize different formats will take some time. After a few weeks of traversing the Internet, it proves easier to see, for example, how large a file is on an operating system you're otherwise not acquainted with.

With many FTP implementations, it's also possible to take the output of dir and put it into a file on the local system with

ftp> dir n* outfilename

the contents of which can then be read outside of the live FTP connection; this is particularly useful for systems with very long directories (like ftp.uu.net). The above example would put the names of every file that begins with an `n' into the local file outfilename.

Go to the previous, next section.