Using Internet File Transfer Protocol (FTP)

Module NA30c

 

Contents

Why use FTP, anyway?

Getting files: the Usual Process

Two scenarios: connecting through a host server, vs. direct (SLIP or PPP)

Using a Host Server Direct
  1. Log on to your host computer using telnet or some other remove system access program
  2. Run a file transfer program (commands to do this...coming right up!)
  3. Transfer a file to your file space on the host
  4. Bring the file from the host to your local computer
  1. Run a file transfer program (usually point-and-click environment)
  2. Transfer a file to your local computer

In most cases, we use direct FTP to get files from a server to our workstation at home.

To use host-mediated FTP, you first log in to a server where you have an account (usually running Unix/Linux). You run FTP on that machine, open an FTP connection to an FTP server somewhere else, and transfer the files you want to the server where you have an account. When the file arrives at your server, you open an FTP or other file transfer connection to your own workstation, and transfer the file a second time. That finally gets it to your computer.

Direct FTP is obviously much more convenient! Why is there host-mediated FTP? It was necessary before people commonly had TCP/IP connections at home or in their offices, so it's mainly of historical interest. But for those of us who work professionally in the Internet business, it's important to know about this alternative, because it may be necessary in some circumstances. You never know!

Programs for transfering  files

Starting FTP on your system

If you have this: You do this:
Windows-based PC  Click the Start button Click the Run option Type ftp and press the <Enter> key
Unix workstation or host Type ftp at the system prompt

FTP commands

Command Brief Description
? print local help information
account send account command to remote server
append append to a file
ascii set ascii transfer type
bell beep when command completed
binary set binary transfer type
bye terminate ftp session and exit
case toggle mget upper/lower case id mapping
cd change remote working directory
cdup change remote working directory to parent directory
close terminate ftp session
cr toggle carriage return stripping on ascii gets
delete delete remote file
debug toggle/set debugging mode
dir list contents of remote directory
disconnect terminate ftp session
form set file transfer format
get receive file
glob toggle metacharacter expansion of local file names
hash toggle printing `#' for each buffer transferred
help print local help information
lcd change local working directory
ls list contents of remote directory
macdef define a macro
mdelete delete multiple files
mdir list contents of multiple remote directories
mget get multiple files
mkdir make directory on the remote machine
mls nlist contents of multiple remote directories
mode set file transfer mode
mput send multiple files
nmap set templates for default file name mapping
ntrans set translation table for default file name mapping
open connect to remote tftp
prompt force interactive prompting on multiple commands
proxy issue command on alternate connection
sendport toggle use of PORT cmd for each data connection
put send one file
pwd print working directory on remote machine
quit terminate ftp session and exit
quote send arbitrary ftp command
recv receive file
rename rename file
reset clear queued command replies
rmdir remove directory on the remote machine
runique toggle store unique for local files
send send one file
status show current status
struct set file transfer structure
sunique toggle store unique on remote machine
tenex set tenex file transfer type
trace toggle packet tracing
type set file transfer type
user send new user information
verbose

toggle verbose mode

! escape to the shell
$ execute macro

FTP Access Locations

You can use FTP to get to these archives (anonymous login, enter your email address as the password). There are limits on the number of simultaneos FTP sessions on ftp servers, so many of them will log you off after a certain period (say, 5 minutes) of inactivity.

England     src.doc.ic.ac.uk
Israel      ftp.technion.ac.il
Japan       ftp.inter.spin.ad.jp
Japan       ftp.iij.ad.jp
Sweden      ftp.sunet.se
Taiwan      nctuccca.edu.tw
Taiwan      ftp.ccu.edu.tw
USA         wuarchive.wustl.edu
USA         ftp.oregonstate.edu

Getting Software from MSDOS.ARCHIVE.UMICH.EDU

The remainder of this document is quoted from The University of Michigan's MSDOS FTP archives help file. This server is no longer active, but the instructions can be used with minor modifications on any of the FTP systems listed above.

Msdos.archive.umich.edu is a Unix host with many types of public domain and shareware software. To get software from it, you can use a program called 'ftp'. This program will run on almost all machines connected to the internet. You can also download files using gopher. And, it is mirrored on the following sites:
Germany:  info2.rus.uni-stuttgart.de:/afs/umich.edu/group/itd/archive/msdos
Missouri: wuarchive.wustl.edu:systems/msdos/umich.edu
Oregon:   ftp.orst.edu:/pub/mirrors/archive.umich.edu/msdos

Caution: whenever you download software or anything that isn't text, be sure to use the binary command before beginning the download. See module NA36c for details.


How Do I Find What's On MSDOS.ARCHIVE.UMICH.EDU?

Two ways:
  1. Get connected to Msdos.archive.umich.edu via the 'ftp' program, and download the file DIR.LST (more on that in the downloading section). Unix is case-sensitive, so make sure that you type the name in the upper-case.
  2. Get connected to Msdos.archive.umich.edu and change to the archive/msdos directory. List the directories with the 'dir' command. To change to a sub-directory, type 'cd' and then the name of the directory. Example:

  3. cd compression
    or
    cd /msdos/compression
    Note: Unix uses frontslashes, not backslashes like DOS uses.

How do I Get Connected and Download Software?

The ftp method:
  1. get on an Internet connected machine.
  2. Try ftping to our archive by typing:

  3. ftp MSDOS.ARCHIVE.UMICH.EDU
  4. Type "anonymous" when it asks for your login
  5. Give your electronic mail address as your password.
  6. Change to the msdos directory:

  7. cd msdos
  8. Decide if the file is binary or text.
  9. If the file is text, proceed to the next step. If it is binary, type

  10. binary
  11. Type DIR to see the directories. Change to the directory where is the file is:

  12. cd compression
    Don't forget to use the forward slash if necessary.
  13. Download the file:

  14. get filename

What Do I Do After I've Downloaded It?


The compression programs for each of the extensions that a compressed file on the archive can have are as follows:

Extension:    File:
.ARC          msdos/compression/arc/arce.com
.ARJ          msdos/compression/arj/arj241.exe
.LHA or .LZH  msdos/compression/lzh/lha255b.exe
.PAK          msdos/compression/pak/pak251.exe
.Z or .GZ     msdos/compression/gnuzip/gzip124.exe
.ZIP          msdos/compression/zip/pkz204g.exe
.ZOO          msdos/compression/zoo/zoo210.exe

If it's been compressed, decompress it. For example,


Read the Documentation.

The documentation is likely to be in a file called README or README.DOC. Anything ending in .DOC or TXT is likely to be a good bet for documentation. Anything ending in .EXE or .COM or .BAT is likely to be something that you can run.

 
Audience:

This module is for people who want to know how to get files over the Internet using ftp, the File Transfer Protocol. We expect people to know already what the Internet is. (Module NG01c is itended to provide this background.)

Objectives:

When you complete this unit, you should:

Review:  Click here for review questions.

About this document...

Module NA30c: How to Get Files using Internet

Author:
Laurence J. Krieg
Institution:
Department of Computer Information Systems, Washtenaw Community College

Revision Date:
Original version October, 1995

HTML version March, 1996; this version: Monday, 31-Aug-2009 11:47:59 EDT
Copyright © 2003, Laurence J. Krieg, Washtenaw Community College