7.4 Introduction to FTP

FTP (File Transfer Protocol) is a set of rules for transferring files between computers, usually connected through the Internet. If your computer supports FTP and is connected to the Internet, then you can access a large number of computer systems containing a large number of files. This facility was one of the main reasons for the initial popularity of the Internet. The program that supports the transfer of files using FTP is ftp. You can access information on virtually any topic using ftp. In addition, you can access a multitude of archives of software for most computer systems (DOS, UNIX, Macintosh, etc.).

FTP uses the client / server model that was discussed with gopher. Both client and server computers need to be running the ftp software. Unfortunately most of the non-Windows versions of ftp are not particularly easy to use.

7.5 How to Use FTP & Anonymous FTP

To use ftp, you need to know the address of the FTP site you want to access. To connect to an FTP server, type ftp <server address> where server address is either the domain name or IP address of the FTP server (Fig. 7.12). If you only type ftp, your computer will display the FTP prompt, and you will be expected to use the open command followed by the server address. Many of the servers will then display a lot of information about the site while others will only identify the site.

There are two ways to connect to the FTP server. If you have account on the server, you can log on normally and access any of the files in your account. In most cases however, you will be using anonymous ftp. To use anonymous ftp, you will type in "anonymous" as the login name and type in your e-mail address as the password for the server computer. Most FTP servers will accept anything for the password, but it is polite to type your e-mail address.

-VE> ftp ftp.jaring.my

220 pop.jaring.my FTP server (Version 2.1aWU(6) Wed Dec 7 18:22:15 MYT

Connected to pop.jaring.my.

Name (FTP.JARING.MY:wsummers): anonymous

331 Guest login ok, send your complete e-mail address as password.

Password:

230- Welcome to FTP server on Jaring Network, Malaysia

230-

230- Local time is Sat Jun 17 00:00:36 1995.

230-

230-Dear Guest from venus.nmhu.edu,

230-

230-This FTP server is still experimental.

230-

230-The main purpose of this machine is to serve as a local distribution

230-point for publicly available software and data, gathered from other

230-servers worldwide. To conserve bandwidth, users from outside Malaysia

230-should not use this machine to pick up data which originated from other

230-foreign sources. Please get them from other servers nearer to you.

230-

230-All transactions are logged. If you don't like it, please log off.

230-

230-Uploading is allowed into /pub/incoming directory on FTP.JARING.MY only.

230-We will move it to /pub/share if you let us know by e-mail (noc@jaring.my).

230-Give us a short description of the package.

230-*** IF WE DON'T RECEIVE ANY NOTIFICATION, THE FILE WILL BE DELETED ***.

230-

230-===================================================

230- Please use ftp.jaring.my rather than jaring.my.

230-===================================================

230-

230-Thank you for your cooperation.

230-

230 Guest login ok, access restrictions apply.

FTP>

Fig. 7.12 - Using ftp to connect to ftp.jaring.my

Many of the FTP sites are very busy and you might see the following message

530 Too many users connected currently, Please try again later.

Try again later. As you use ftp, you will notice that all of the responses from the FTP server are preceded by an identification number. You can ignore these numbers. Once you have logged onto an FTP server, you will need to navigate around the file system. One of the first commands you should enter is help or ? (Fig. 7.13). This will give you a list of available commands on the FTP server. Table 7.1 describes many of the commonly used commands.

Fig. 7.13 - List of ftp commands

 

Command Description

? / help Displays ftp commands

ascii Specifies that files are to be transferred as ASCII files

binary Specifies that files are to be transferred as binary files

bye / quit Closes the current connection and returns you to your computer

cd remote directory Changes the directory on the remote computer

cdup Same as cd ..

close Closes the current connection and returns you to the FTP prompt

dir Lists the long contents of the directory, similar to UNIX command ls -l

get remote file Copies the named file from the remote host and stores it on the local host with the same file name

hash Causes a # to appear for each block of transferred data

lcd local directory Changes the directory on your local computer

put local file Copies the named file from the local host and stores it on the remote host

pwd Tells you the name of the current directory on the remote host

Table 7.1 - Description of ftp selected commands

One of your first tasks is to determine where you are and where you can go in the remote computer’s directory structure. You might start with dir, which gives you a list of the subdirectories (Fig. 7.14). This usually gives you more information than you need. The names of the subdirectories and files are the last column. Different computer systems have different ways of organizing their files, but most archives are similar to the examples shown. If all you are interested in are the directory and file names, you can type ls (Fig. 7.15). The command you might next want to use is cd, to change to a subdirectory containing the file(s) that you are interested in (Fig. 7.15). If you lose track of where you are in the file structure of the remote computer, you can type pwd to display the name of the current directory.

FTP> dir

200 PORT command successful.

150 Opening ASCII mode data connection for /bin/ls.

total 22

drwxr-xr-x 6 noc noc 512 May 23 16:50 .

drwxr-xr-x 6 noc noc 512 May 23 16:50 ..

lrwxrwxrwx 1 root other 7 Nov 26 1994 bin -> usr/bin

d--x--x--x 2 root other 512 Nov 26 1994 dev

d--x--x--x 3 root other 512 Dec 1 1994 etc

-rwx------ 1 root other 3431 Nov 26 1994 mkftp

drwxrwxr-x 31 noc noc 1024 Jun 16 09:05 pub

d--x--x--x 4 root other 512 Nov 26 1994 usr

226 Transfer complete.

492 bytes received in 00:00:00.89 seconds

FTP>

Fig. 7.14 - Using the dir command

FTP> cd pub

250-Please read the file README

250- it was last modified on Sat Dec 3 22:31:03 1994 - 196 days ago

250 CWD command successful.

FTP> ls

200 PORT command successful.

150 Opening ASCII mode data connection for file list.

msdos

README

pcdos

.cshrc

info

.kermrc

.hushlogin

list.txt

ls-lR

novell

pub

os

rfc

mac

usenet

.gopherrc

src

jalinan

gnu

incoming

simtel

archives

Linux

BAD

irc

conf

cert

list.Z

mosaic

ncsa

jaring

share

internet-draft

cancare

cica

budget95

internet

tmp

226 Transfer complete.

289 bytes received in 00:00:00.22 seconds

FTP>

Fig. 7.15 - Using the cd and ls commands

Once you have located the file(s) that you want to download, you can use the get command. If the file is a text file, you would use the default setting of ascii to retrieve it. However, if you are downloading programs or utilities, you will need to specify the binary setting before using the get command. Since many of the files you download can be quite long and take a long time to download, you might want to issue the hash command before the get command. This will allow you to monitor the progress of the file retrieval (Fig. 7.16).

FTP> binary

226 Transfer complete.

FTP> hash

Hash mark printing on (1024/hash mark).

FTP> get list.Z

200 PORT command successful.

150 Opening BINARY mode data connection for list.Z (434072 bytes).

##############################################################################

##############################################################################

##############################################################################

##############################################################################

###############################################################

226 Transfer complete.

local: LIST.Z remote: list.Z

434072 bytes received in 00:02:18.18 seconds

FTP>

Fig. 7.16 - "getting" a file

Usually, files are grouped together in a compressed file to minimize the amount of data transfer. The most common archival and compression file formats are "tar" and "zip". Tar archives a collection of files appended together and can be unpacked by running the UNIX command tar. Zip files can be unpacked and decompressed using unzip or PKUnzip. Table 7.2 lists many of the common file types you will find along with whether to download them using binary or ascii. To get a more complete list of file compression and archiving methods for a wide variety of computers, ftp to the following site and retrieve the file there.

ftp.cso.uiuc.edu directory: /doc/pcnet/compression

SUFFIX FTP TYPE

.arc bin ARChive (hardly used anymore)

.arj bin Arj (mostly MS-DOS)

.au bin Audio sound files

.gif bin Graphics Interchange Format

.gz bin GNU Zip

.hqx asc HQX (Mac, Mac equivalent of uuencode)

.jpg bin JPEG (graphics format)

.lzh bin LHa, LHarc, Larc

.mpg bin MPEG (graphics format)

.shar asc SHell ARchive (mostly Unix)

.sit bin Stuff-It (Mac)

.tar bin Tape ARchive (mostly Unix)

.txt asc Text File

.uu asc uuencode/uudecode (also .uue)

.wav bin Wave sound files

.Z bin compress (mostly Unix, seen in combination with tar as .tar.Z files)

.zip bin Zip (either PKZip or Zip/Unzip)

.zoo bin Zoo

Table 7.2 - Common file types found on FTP servers

 

7.6 How to Find Files?

Finding a file on the Internet using ftp can be quite overwhelming. Certainly you can browse each site and traverse all of the subdirectories, but not if you have other things to do. Fortunately, there is a solution called archie. Archie, short for archives, is a database system that keeps a list of files on different FTP sites.

You can use archie in several ways. If your computer has the archie client installed, you can simply run it from there by typing archie. You can also use e-mail to an archie server requesting the locations of files. The third method is to telnet to an archie server and use it there (Fig. 7.17). Table 7.3 lists several sites maintaining archie servers. You can send mail to many of these sites at 'archie@site_name' for a help file. Log onto these any of these servers using "archie" as the login name and press the "Enter" key for the password.

Fig. 7.17 - "telneting" to an archie server

domain name IP address country

archie.au 139.130.4.6 Australia

archie.th-darmstadt.de 130.83.22.60 Germany

archie.wide.ad.jp 133.4.3.6 Japan

archie.kr 128.134.1.1 Korea

archie.sogang.ac.kr 163.239.1.11 Korea

archie.luth.se 130.240.18.4 Sweden

archie.switch.ch 130.59.1.40 Switzerland

archie.ncu.edu.tw 140.115.19.24 Taiwan

archie.doc.ic.ac.uk 146.169.2.10 United Kingdom

archie.unl.edu 129.93.1.14 USA

archie.internic.net 198.48.45.10 USA

archie.rutgers.edu 128.6.18.15 USA

archie.ans.net 147.225.1.10 USA

archie.sura.net 128.167.254.179 USA

Table 7.3 - List of archie servers

To find a file called 'filename' you would type: archie filename if you’re using a client or prog filename (Fig. 7.18) if you are logged onto an archie server. There are lots of options available, so you will probably want to use help. Once you’ve entered the command, sit back and wait. Archie servers are generally very busy and it may take quite a while to locate all of the files you are interested in. Most servers will give you an estimate of how long it will take and how far down the queue you are on that server. Be patient and be willing to try another server.

Fig. 7.18 - Finding files about Kuala Lumpur

 

7.7 FTP and Archie Software

There are several very good software packages for Windows and Macintosh users. These are available from most of the popular ftp archive sites listed in the next section.

Windows users might look for WS_FTP32, FTP, WinQVT and WSArchie. All of these are available in sites listed in the next section. Once you have downloaded the ZIP file and "unzipped" it, you will need to create a program icon and install the program as a Windows application. To activate the program, simply click on the icon (Fig. 7.19).

Fig. 7.19 - FTP icons

Once you’ve clicked on the FTP icon (Fig. 7.20), you will see the ftp prompt. You will need to open the site of the FTP server and then you can issue any of the ftp commands. Don’t forget to type bye when you are finished so that your computer will be disconnected from the remote server.

Fig. 7.20 - FTP client

WS_FTP has a much nicer user interface. After you click its icon (Fig. 7.21), a "Session Profile" window will open. In the Session Profile window, you will be able to specify the host name, its type, the user id and password. All of this information can be saved for use later. After connecting to a remote host (Fig. 7.22), you can move up and down the file structure by clicking on the subdirectories. To copy a file from one computer to the other, you simply highlight the file to be copied and specify the directory where you want it placed and then press the appropriate arrow.

Fig. 7.21 - WS_FTP Session Profile Screen

Fig. 7.22 - Copying files between connected computers

After clicking the WS_Archie icon, You will need to enter the word or filename to search for, select the name of an archie server, and select the type of search to perform (Fig. 7.23). Archie "searches" can take quite some time, so be patient and hopefully you will find what you’re looking for (Fig. 7.24).

Fig. 7.23 - WS_Archie

Fig. 7.24 - Results of an archie search

 

7.8 Where to Go From Here

The best way to learn how to use these Internet tools, is to experiment with them. The following are lists of interesting telnet and ftp sites for you to explore. As you explore one, you will find many more to explore from there.

Telnet Sites

hermes.merit.edu directory of remote services (type HELP at prompt)

martini.eecs.umich.edu 3000 (martini) Geographic Name Server

books.com BBS bookstore

career.com BBS career service

freenet-in-a.cwru.edu Cleveland Free-Net BBS

tudrwa.tudelft.nl Delft University BBS (log-in as bbs)

heartland.bradley.edu Heartland Freenet BBS (log-in as bbsguest)

Table 7.4 - Telnet Locations

FTP Sites

ftp.jaring.my Malaysian ftp site

ftp.cica.indiana.edu Windows archive

sumex-aim.stanford.edu Macintosh archive

wuarchive.wustl.edu &

oak.oakland.edu DOS & Amiga archives

ftp.rpi.edu Internet & Computer-Mediated Communications

(AKA The December List)

csd4.csd.uwm.edu Special Internet Connections (Scott Yanoff s List)

ftp.cs.wisc.edu Landweber’s list of connected countries

rtfm.mit.edu archive of USENET newsgroups

ftp.netcom.com/pub/mailcom/internaut on-line magazine

boombox.micro.umn.edu University of Minnesota’s ftp site

sunsite.unc.edu University of North Carolina’s ftp site

ftp.iij.ad.jp Tokyo

ftp.tricera.nmhu.edu New Mexico Highlands University

ftp.borland.com Borland

ftp.microsoft.com Microsoft

ftp.novell.com Novell

ftp.netcom.com SlipKnot

ftp.NCSA.uiuc.edu Mosaic Web

ukanix.cc.ukans.edu Lynx

ftp.utas.edu.au Trumpet News Reader

ftp.mcom.com Netscape

titan.ksc.nasa.gov NASA

rtfm.mit.edu Compression FAQ & ftp lists

cs.ucr.edu Computer Viruses archive

Table 7.5 - ftp sites