Questions & Answers about anonymous ftp
---------------------------------------

                   [email protected]

                     January 5, 1990



    This is a  document  I  pieced  together  from  various
sources.   It  is  not  a  definitive guide to ftp, but just
something to give a novice a general idea of what it is  and
how to do it.
                       What is FTP?

    FTP  (File  Transfer  Protocol)  allows  a  person   to
transfer  files  between  two computers, generally connected
via the Internet.  If your system has FTP and  is  connected
to  the  Internet,  you  can  access  very  large amounts of
archives available on a number of systems.  If  you  are  on
Bitnet or a UUCP host, you should look for servers that work
through the mail.  A good source of information on  archives
in general, is the Usenet newsgroup comp.archives.

                  What is Anonymous FTP?

    Many systems  throughout  the   Internet  offer   files
through  anonymous   FTP.  These include software, documents
of  various  sorts,  and  files  for  configuring  networks.
Archives  for  electronic  mailing   lists  are often stored
available through anonymous  FTP.  Note  that all   this  is
subject to  change.

                         Commands

    All the normal FTP commands may  be  used  to  retrieve
files.   Some FTP commands are the same on different comput-
ers, but others are not.   Usually,  FTP will list the  com-
mands  if you type "help"  type a question mark (?).   Also,
your computer's help command may have information about FTP.
Try man ftp or man ftpd.

Some useful commands available on most systems include:

    get     copy a file from the remote computer to yours
    ls/dir  list the files in the current directory
    cd      Change directory
    binary  Switch to binary mode.  For transferring binary files
    ascii   Switch to ascii mode. Ascii mode is the default mode

                        Procedure

    Anonymous ftp is a facility offered by many machines on
the Internet.  This permits you to log in with the user name
'anonymous' or the user name  'ftp'.  When  prompted  for  a
password,  type  your  e-mail address -- it's not necessary,
but it's a courtesy for those sites that like to know who is
making use of their facility. Be courteous.

    You can then look  around  and  retrieve  files.  (Most
anonymous ftp sites do not permit people to store files)

                            1




    Typically,  a  directory  called  'pub'  is  where  the
interesting  things  are stored. Some sites will have a file
with a name like ls-lR, that contains a complete list of the
files  on  that site. Otherwise, you can type ls -lR and get
such a listing -- for some sites, this can take a LONG time.

    Usuually, files are grouped in archive  files,  so  you
don't have to get many small files separately. The most com-
mon archival file format for the Internet is tar.  Occasion-
ally, people use shell archives (shar) instead. tar archives
can be unpacked by running the tar command -- you  may  want
to  first  do  a 'tar t' on the file to see what it contains
before  unpacking  it.  Be  careful  when  unpacking   shell
archives  since they have to be run through the Bourne shell
to unpack them. (The simplest way is to use the unshar  com-
mand)

    Files are often stored compressed -- for Unix, the most
common  scheme  is  the  compress program, indicated by a .Z
suffix on the file name.   Sometimes,  people  use  programs
like arc or zoo, which are combined archival and compression
formats. (There are probably other archival formats as  well
-  talk to the systems staff if you encounter them and don't
know how to deal with them)

    When retrieving non-text files,  you  must  use  binary
mode, otherwise the file gets messed up. To do this, use the
'binary' command. (It's safe to set this for text files.  If
the  site  at the other end is non-Unix, you may need to use
some other mode -- see the documents for that site  and  for
ftp)

    The simplest way to initiate FTP would be to  give  the
command  'ftp  <system-name>',  where  <system-name>  is the
remote system you are connecting to, either  a  name  (wsmr-
simtel20.army.mil, if you have an entry in /etc/hosts or are
accessing a Domain-name  Server)  or  the  InterNet  address
(26.2.0.74,  for Simtel20).  After a short wait, you will be
prompted for your username.  If you do not have  an  account
on  the  remote  system,  some  systems  allow  you  to  use
'anonymous'.  This gives you a restricted access path.

    You would then be prompted for a password.   Some  sys-
tems  will  tell you to send your real identity as the pass-
word.  What you type doesn't matter, but it is suggested  to
give  your  mail  address.  Other systems need a password of
'guest', or something similar.

    After that, you should receive the FTP prompt  (usually
ftp>),  and  now  have  access.   You can get a directory of
files be giving a 'dir' command, or if the remote system  is
Unix-based,  'ls -l' will give the familiar output.  On Sim-
tel20, there is a file available in  the  default  anonymous
ftp  directory  that  explains  what  Simtel20 is, and where
files are located.  The  name  is  'SIMTEL-ARCHIVES.INFO.nn,
where  ".nn" is a file generation number.  You don't need to
specify the file generation number when requesting the file.
In  fact, it's better not to because you will always get the
latest generation that way.
9
9                             2




    Unix systems  will  all  have  the  familiar  directory
structure,  and moving around is done with the familiar 'cd'
or 'cwd' command.  TOPS-20 systems have a  different  struc-
ture,  but movement is still accomplished with the 'cd' com-
mand.

    Different  systems  have  different  organizations  for
their files, and the above example is just the way I have it
set up.  By 'poking' around other systems, you can learn how
their  files  are set up, and zip around much faster.  Note,
however, that FTP will not allow you outside the FTP  'root'
directory,  usually  ~ftp on most systems.  So, poking about
the entire system is not permitted.

                        File types

These are the common Unix file types:

 Suffix      FTP Type
  .Z           bin     compress
  .arc         bin     ARChive
  .shar        ascii   SHell ARchive
  .tar         bin     Tape ARchive
  .uu          ascii   uuencode/uudecode
  .zoo         bin     Zoo

However, there are more file compression  types  than  those
listed  above.   Below  is  a  some mail I received recently
describing how to get a document describing  a  much  larger
set of file compression methods and the programs used.
----
>From [email protected] Wed Aug 15 17:42:33 1990
Date: Wed, 15 Aug 90 16:42:51 -0500
From: Mike Jones <[email protected]>
To: [email protected]
Subject: additional info for ftp.list header?

Hello, my name is Mike Jones. I am a student working at the University of
Illinois. I have been compiling a list of file compression and archiving
techniques. My supervisor suggested I ask you if this might be worth
mentioning in the header of the ftp.list. What it shows is the names of
all file compression/archiving methods known to us and the programs to
undo the compression/archive on PC, Mac, Unix, VM/CMS, and Amiga systems.
This could be helpful to people new to ftp that don't know how to unpackage
the file they have just transferred. The list can be seen via anonymous ftp
at: ux1.cso.uiuc.edu

cd doc/pcnet
get compression
get compression2

Thanks you for your time and consideration.

[email protected]





9
9                             3


==== <g FTP>                        10 links in glossary topic
==== <g ANONYMOUS>                   2 links in glossary topic