beausol@milton.u.washington.edu (Raymond Beausoleil) (04/09/91)
As promised, here is the second of a two-part article that I agreed to
write for Optics & Photonics News. Once again, I find myself crashing into
a word-count limit, so those of you with experience in these matters
will notice that I have oversimplified and just outright omitted some things.
If you find any factual errors in the article, then please let me
know ASAP! I am particularly concerned about my references to the
MS-DOS archives.
Again, thanks in advance,
Ray Beausoleil (beausol@u.washington.edu)
----------------------------------------------------------------------
An FTP Primer II: Downloading and Decoding
Ray Beausoleil
beausol@u.washington.edu
Last month, in Part I of this article, I briefly described the INTERNET File
Transfer Protocol (FTP). In particular, I demonstrated how to use the Unix "ftp"
interface to transfer personal computer software packages from a remote archive
to your local Unix mainframe or minicomputer. These programs have usually been
compressed and/or encoded by the archive administrators. This month, I will
provide a brief introduction to the process of first downloading this software
to your microcomputer, and then decoding it using special utility programs.
The method that you must use to download software from your local mainframe
computer to your microcomputer depends on the operating system and the software
installed on the mainframe, and the configuration of your network (e.g.,
Ethernet or modem). You should begin by asking your system administrator for a
list of information transfer protocols that have been installed at your site and
the commands that invoke these protocols. Some of the most popular protocols
include XModem, YModem, ZModem, Kermit, and NCSA Telnet. Paul Kelley has
described XModem and Kermit in his article "Information transfer for personal
computers," published in the February 1991 edition of this column.
In Tables I and II, I have listed freeware and shareware telecommunications
and utility software packages for the Macintosh and the IBM PC, respectively.
For Macintosh software, I recommend the archive at sumex-aim.stanford.edu
(INTERNET address 36.44.0.6), located in the directory /info-mac. ZTerm, an
excellent shareware telecommunications application program, can be found in the
directory /info-mac/comm. ZTerm not only uses the XModem and YModem data
transfer protocols, but also offers one of the best implementations of the
ZModem protocol for any personal computer. When you are connected through ZTerm
to a Unix mainframe that uses the ZModem protocol, you may download a file
simply by entering "sz" followed by a space and the name of the file. ZTerm
detects that a file is being sent, identifies the file type, and then chooses
the correct transfer mode! For local systems which have implemented the Kermit
protocol, the program MacKermit (also available at sumex-aim.stanford.edu in the
/comm subdirectory) provides a robust Macintosh interface.
A huge archive of IBM PC software is maintained at wuarchive.wustl.edu
(INTERNET address 128.252.135.4), in the directory /mirrors/msdos. The most
popular shareware telecommunications package for the IBM PC, ProComm, may be
found there in the subdirectory named (oddly enough) /procomm. ProComm uses the
XModem, YModem, and Kermit transfer protocols, and can also follow the ZModem
protocol through an external command shell. ProComm has evolved into the
relatively inexpensive commercial product ProComm Plus.
As Paul Kelley mentioned in his article, the simplest way to download files
to your microcomputer is to display the file on your monitor. Both ZTerm and
Procomm allow you to capture incoming text and write the text to a disk file. As
described below, you may then decode the files for later use. Almost all of the
files stored in the large archive of Macintosh software maintained at sumex-
aim.stanford.edu have been encoded as ASCII (text) characters using a format
known as BinHex 4. These files have names that end with the extension ".hqx",
and can be captured directly from your monitor after you have transferred them
to your local Unix host. You may direct a Unix machine to write a ".hqx" file to
your monitor by entering the command "cat", followed by a space and the name of
the file to be transferred. However, almost all of the files stored in the IBM
PC software archive wuarchive.wustl.edu have been stored in binary format. After
you have transferred one of these files (e.g., "file.arc") to your local Unix
mainframe or minicomputer, you can use the command "uuencode file.arc file.arc"
to ASCII-encode "file.arc" and then write it to your monitor. In both cases, you
must decode the ASCII file on your microcomputer using one of the utility
programs listed in Tables I and II; since you will not be able to decode these
utilities themselves until after you have the utilities, you must obtain copies
of their binary executable files from a colleague or user group.
A typical binary file can be up to 50% smaller than the corresponding encoded
ASCII file, and can be transferred to your personal computer in proportionally
less time. Therefore, if at all possible, you should try to download using the
binary transfer mode. This is relatively straightforward for IBM PC files
transferred from the wuarchive.wustl.edu archive and then downloaded to a
microcomputer using ProComm Plus.
You may decode BinHex Macintosh files into MacBinary files on your local Unix
host prior to downloading them using a utility such as "mcvert." You may build
your own copy of "mcvert" by following these steps: (1) transfer the file
"mcvert-15.shar" from the "/info-mac/unix" subdirectory at sumex-
aim.stanford.edu using "ftp"; (2) enter "sh mcvert-15.shar" at your local Unix
prompt, and ignore any error messages caused by the file header; and (3) enter
"make" at the Unix prompt. This process will create a number of files on your
directory; you may delete all but "mcvert" itself. Now, to decode any files that
have the extension ".hqx" (including files that consist of more than one part),
simply enter "mcvert *.hqx" at the Unix prompt. Your Unix directory will then
contain files with the extension ".bin", which can be downloaded using the
MacBinary transfer mode.
Both the Macintosh and the IBM PC binary files that you have downloaded to
your personal computer are actually miniature archives that contain one or more
compressed executable and/or data files. These archives can be easily and
rapidly expanded using the appropriate utility files listed in Tables I and II.
(The label "SEA" designates self-extracting archives which will decompress
themselves automatically upon launching.) On the Macintosh, files obtained from
sumex-aim.stanford.edu will usually have extensions such as ".sit" (Stuffit
Classic), ".cpt" (Compact Pro), or ".sea" (Compact Pro self-extracting archive).
On the IBM PC, files transferred and downloaded from wuarchive.wustl.edu will
have extensions such as ".ARC" (PKUNPAK.EXE), ".ZIP" (PKUNZIP.EXE), ".LHZ"
(LHARC.EXE), ".ZOO" (LOOZ210.EXE), or ".EXE" (self-extracting archive or simple
executable file).
At first, the downloading and decoding process may seem daunting to you,
particularly if either the system architecture of your local host is not Unix,
or the software installed on that system does not follow one of the few examples
that I have given in this article. Rest assured that others have almost
certainly solved your problems already; one of your most dependable resources is
the knowledge of your colleagues. Alternatively, as I mentioned briefly in Part
I, you may learn more about personal computer telecommunications by subscribing
to the appropriate INTERNET news groups. If you ask the right people the right
questions, you might find that while you may not be able stand upon the
shoulders of giants, you may be able to stand upon their feet.
(I am grateful to John McGarvey, Matt Derstine, Geoff Kinnel, Betsy Richards,
David Faust, and Geoff Allen for their generous assistance in gathering
information for this article.)
Table I: Files obtained from sumex-aim.stanford.edu (36.44.0.6) in the
directory /info-mac
File Name Location Description
-----------------------------------------------------------------------
file-types.txt /help Brief list of sumex-aim file types
zterm-085.hqx /comm ZTerm (X,Y,ZModem; no Kermit)
mackermit-098.hqx /comm MacKermit (No X,Y,ZModem)
stuffit-16-part1.hqx /util Stuffit Classic w/BinHex 4 (SEA)
stuffit-16-part2.hqx /util
compact-pro-13.hqx /util Compact Pro w/BinHex 4 (SEA)
mcvert-15.shar /unix Unix shell archive for mcvert
Table II: Files obtained from wuarchive.wustl.edu (128.252.135.4) in the
directory /mirrors/msdos
File Name Location Description
-----------------------------------------------------------------------
00-files.doc /starter Description of wuarchive file types
00-index.txt /starter Descriptions of files in /starter
prcm243.arc /procomm ProComm shareware communications program
prcm243d.arc /procomm ProComm documentation
prcm243d.arc /procomm ProComm utilities
pk361.exe /starter PKPAK.EXE/PKUNPAK.EXE (SEA)
pkz110eu.exe /starter PKZIP.EXE/PKUNZIP.EXE (SEA)
lh113c.exe /starter LHARC.EXE (SEA)
looz210.com /starter ZOO archive extracter/lister
uudecode.com /starter Convert ASCII uuencoded files to binary