Introduction to the Internet

Starting to use FTP (File Transfer Protocol)

Available Software

Connecting

To establish an FTP connection with a remote host from a UNIX host, simply type ftp <host-name>. To do so from a Mac, use the Fetch program and select Open Connection and enter the remote host name. In either case, you will need to enter a valid user name and password, or to establish an anonymous FTP session (username is anonymous, password is your full E-mail address).

Once you are connected, you can navigate the directory structure of the remote host to look for desired files or folders. If you are using a Mac program like Fetch, navigating and retreiving files should be straightforward. However, if you are using a command line to FTP files, you should look at the Basic Commands section below.

Basic Concepts

Basic Commands

Using FTP: A Sample Session

The following is a demonstration of a text-based FTP session. We know the file we seek, the complete text of Treasure Island, resides on the UIUC server for Project Gutenberg, an anonymous FTP server for a large collection of public domain literary.

> ftp mrcnext.cso.uiuc.edu
Connected to mrcnext.cso.uiuc.edu.
220 mrcnext.cso.uiuc.edu FTP server (Version wu-2.4(1) Tue Apr 19 13:09:35 CDT 1994) ready.
Name (mrcnext.cso.uiuc.edu:fprefect): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password: -username@umich.edu (The password is not displayed as you type)
230 Guest login ok, access restrictions apply.
ftp> cd pub/etext
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
lost+found
0INDEX.GUT
INDEX100.GUT
INDEX200.GUT
LIST.COM
NEWUSER.GUT
articles
etext90
etext91
etext92
etext93
etext94
freenet
gutmar3.3
hart
interpedia
ippe
note.old
usonly
226 Transfer complete.
214 bytes received in 0.028 seconds (7.5 Kbytes/s)
ftp> cd etext94
250 CWD command successful.
ftp> ls treas*
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
treas10.txt
treas10.zip
226 Transfer complete.
remote: treas*
26 bytes received in 0.0032 seconds (7.8 Kbytes/s)
ftp> get treas10.txt treasure.isle.txt
200 PORT command successful.
150 Opening ASCII mode data connection for treas10.txt (388518 bytes).
226 Transfer complete.
local: treasure.isle.txt remote: treas10.txt
397632 bytes received in 7.5 seconds (52 Kbytes/s)
ftp> bye
221 Goodbye.

Customizing

Both archie, for UNIX, and Anarchie, for the Mac, give you the power to search numerous FTP archives for a desired file by name comparison. Once you have found the file or files you seek, you can then use FTP to download them.

Not only can you use FTP to download files from an FTP archive, but you can also let your computer act as an FTP server for others to connect to. Most UNIX systems are already FTP servers, but require a valid username and password to connect, which is undesirable for general use. Mac programs such as FTPd and NCSA Telnet also act as FTP servers, and give the user fine control over access and anonymous transfers.

FTPd is a general tool for that makes your personal computer into an FTP server for an extended period of time. NCSA Telnet, however, is most useful for temporarily setting up an FTP server to exchange files between your computer and a host you are currently telnetting to. With anonymous FTP enabled, you can select Send FTP Command to instruct a remote host to connect to your Mac as an FTP client to server. Then, by sending FTP commands from that remote host, you can (rather counter-intuitively) "get" files from your Mac to the FTP client and "put" files from the remote file system to your local computer's hard disk.

Encoded Files

There are numerous programs that collect or encode files for FTP distibution, and these vary by platform and nature of the data. By sending compressed data, file transfers use less Internet bandwidth at the cost of additional user work for both uploading and downloading files. Here is a summary of different software and file extensions you may encounter:

Unix Formats

Macintosh Formats

Quick note: Macintosh files, unlike other computer systems, are comprised of 2 parts, or forks, that need to be integrated for transfer. Both BinHex and MacBinary will make suitable files for FTP; other compression methods are not designed for immediate FTP.

Email as an alternative to FTP

Because FTP requires an active server to connect to, and most users do not have an anonymous FTP server available for to post software for quick distribution, many people often use Electronic Mail to send files directly to the desired recipients. This eliminates the need to create an FTP server or to pass out your account password for others to connect.

All popular mail software has the ability to append a data file to the end of a message for software distribution. Likewise, each mail client can also save such a file to disk for later decoding and use. For most user to user file transfers, it is often preferable to send it directly by mail than to set up or post it to an FTP archive.


This document was created at the University of Michigan School of Information and Library Studies (SILS), but it has been designed for public use. Permission is hereby granted for unlimited print and electronic redistribution. Your feedback is encouraged.

fprefect@umich.edu - 1/16/95