home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doc_net / ftphelp < prev    next >
Encoding:
Text File  |  1990-04-04  |  6.4 KB  |  196 lines

  1.  
  2.  
  3.  
  4.           Anonymous FTP: questions, answers, etc.
  5.  
  6.                       January 5, 1990
  7.  
  8.  
  9.  
  10.      This is a  document  I  pieced  together  from  various
  11. sources.   It  is  not  a  definitive guide to ftp, but just
  12. something to give a novice a general idea of what it is  and
  13. how to do it.
  14.                         What is FTP?
  15.  
  16.      FTP  (File  Transfer  Protocol)  allows  a  person   to
  17. transfer  files  between  two computers, generally connected
  18. via the Internet.  If your system has FTP and  is  connected
  19. to  the  Internet,  you  can  access  very  large amounts of
  20. archives available on a number of systems.  If  you  are  on
  21. Bitnet or a UUCP host, you should look for servers that work
  22. through the mail.  A good source of information on  archives
  23. in general, is the Usenet newsgroup comp.archives.
  24.  
  25.                    What is Anonymous FTP?
  26.  
  27.      Many systems  throughout  the   Internet  offer   files
  28. through  anonymous   FTP.  These include software, documents
  29. of  various  sorts,  and  files  for  configuring  networks.
  30. Archives  for  electronic  mailing   lists  are often stored
  31. available through anonymous  FTP.  Note  that all   this  is
  32. subject to  change.
  33.  
  34.                           Commands
  35.  
  36.      All the normal FTP commands may  be  used  to  retrieve
  37. files.   Some FTP commands are the same on different comput-
  38. ers, but others are not.   Usually,  FTP will list the  com-
  39. mands  if you type "help"  type a question mark (?).   Also,
  40. your computer's help command may have information about FTP.
  41. Try man ftp or man ftpd.
  42.  
  43. Some useful commands available on most systems include:
  44.  
  45.      get     copy a file from the remote computer to yours
  46.      ls/dir  list the files in the current directory
  47.      cd      Change directory
  48.      binary  Switch to binary mode.  For transferring binary files
  49.      ascii   Switch to ascii mode. Ascii mode is the default mode
  50.  
  51.                          Procedure
  52.  
  53.      Anonymous ftp is a facility offered by many machines on
  54. the Internet.  This permits you to log in with the user name
  55. 'anonymous' or the user name  'ftp'.  When  prompted  for  a
  56. password,  type  your  e-mail address -- it's not necessary,
  57. but it's a courtesy for those sites that like to know who is
  58. making use of their facility. Be courteous.
  59.  
  60.      You can then look  around  and  retrieve  files.  (Most
  61. anonymous ftp sites do not permit people to store files)
  62.  
  63.                              1
  64.  
  65.  
  66.  
  67.  
  68.      Typically,  a  directory  called  'pub'  is  where  the
  69. interesting  things  are stored. Some sites will have a file
  70. with a name like ls-lR, that contains a complete list of the
  71. files  on  that site. Otherwise, you can type ls -lR and get
  72. such a listing -- for some sites, this can take a LONG time.
  73.  
  74.      Usuually, files are grouped in archive  files,  so  you
  75. don't have to get many small files separately. The most com-
  76. mon archival file format for the Internet is tar.  Occasion-
  77. ally, people use shell archives (shar) instead. tar archives
  78. can be unpacked by running the tar command -- you  may  want
  79. to  first  do  a 'tar t' on the file to see what it contains
  80. before  unpacking  it.  Be  careful  when  unpacking   shell
  81. archives  since they have to be run through the Bourne shell
  82. to unpack them. (The simplest way is to use the unshar  com-
  83. mand)
  84.  
  85.      Files are often stored compressed -- for Unix, the most
  86. common  scheme  is  the  compress program, indicated by a .Z
  87. suffix on the file name.   Sometimes,  people  use  programs
  88. like arc or zoo, which are combined archival and compression
  89. formats. (There are probably other archival formats as  well
  90. -  talk to the systems staff if you encounter them and don't
  91. know how to deal with them)
  92.  
  93.      When retrieving non-text files,  you  must  use  binary
  94. mode, otherwise the file gets messed up. To do this, use the
  95. 'binary' command. (It's safe to set this for text files.  If
  96. the  site  at the other end is non-Unix, you may need to use
  97. some other mode -- see the documents for that site  and  for
  98. ftp)
  99.  
  100.      The simplest way to initiate FTP would be to  give  the
  101. command  'ftp  <system-name>',  where  <system-name>  is the
  102. remote system you are connecting to, either  a  name  (wsmr-
  103. simtel20.army.mil, if you have an entry in /etc/hosts or are
  104. accessing a Domain-name  Server)  or  the  InterNet  address
  105. (26.2.0.74,  for Simtel20).  After a short wait, you will be
  106. prompted for your username.  If you do not have  an  account
  107. on  the  remote  system,  some  systems  allow  you  to  use
  108. 'anonymous'.  This gives you a restricted access path.
  109.  
  110.      You would then be prompted for a password.   Some  sys-
  111. tems  will  tell you to send your real identity as the pass-
  112. word.  What you type doesn't matter, but it is suggested  to
  113. give  your  mail  address.  Other systems need a password of
  114. 'guest', or something similar.
  115.  
  116.      After that, you should receive the FTP prompt  (usually
  117. ftp>),  and  now  have  access.   You can get a directory of
  118. files be giving a 'dir' command, or if the remote system  is
  119. Unix-based,  'ls -l' will give the familiar output.  On Sim-
  120. tel20, there is a file available in  the  default  anonymous
  121. ftp  directory  that  explains  what  Simtel20 is, and where
  122. files are located.  The  name  is  'SIMTEL-ARCHIVES.INFO.nn,
  123. where  ".nn" is a file generation number.  You don't need to
  124. specify the file generation number when requesting the file.
  125. In  fact, it's better not to because you will always get the
  126. latest generation that way.
  127.                              2
  128.  
  129.  
  130.  
  131.  
  132.      Unix systems  will  all  have  the  familiar  directory
  133. structure,  and moving around is done with the familiar 'cd'
  134. or 'cwd' command.  TOPS-20 systems have a  different  struc-
  135. ture,  but movement is still accomplished with the 'cd' com-
  136. mand.
  137.  
  138.      Different  systems  have  different  organizations  for
  139. their files, and the above example is just the way I have it
  140. set up.  By 'poking' around other systems, you can learn how
  141. their  files  are set up, and zip around much faster.  Note,
  142. however, that FTP will not allow you outside the FTP  'root'
  143. directory,  usually  ~ftp on most systems.  So, poking about
  144. the entire system is not permitted.
  145.  
  146.                          File types
  147.  
  148. These are the common Unix file types:
  149.  
  150.   Suffix      FTP Type
  151.    .Z           bin     compress
  152.    .arc         bin     ARChive
  153.    .shar        ascii   SHell ARchive
  154.    .tar         bin     Tape ARchive
  155.    .uu          ascii   uuencode/uudecode
  156.    .zoo         bin     Zoo
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.                              3
  192.  
  193.