home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: DFÜ und Kommunikation / SOS-DFUE.ISO / programm / internet / explorer / ftp-help.txt < prev    next >
Encoding:
Text File  |  1992-08-05  |  6.8 KB  |  173 lines

  1. Using "anonymous ftp"
  2. ---------------------
  3.  
  4.        Using "anonymous ftp" to get files from other Internet machines
  5.  
  6.                  Mark Moraes, University of Toronto
  7.  
  8. Anonymous ftp is a facility offered by many machines on the Internet.
  9. This permits you to log in with the ftp program with the user name
  10. 'anonymous' or the user name 'ftp'. When prompted for a password, type
  11. your e-mail address -- it's not necessary, but it's a courtesy for
  12. those sites that like to know who is making use of their facility. Be
  13. courteous.
  14.  
  15. Most ftp sites do not like people getting files from them during their
  16. working hours since they usually have other load on their systems --
  17. avoid 9am-5pm in their time-zone.
  18.  
  19. Also bear in mind that countries are often connected by relatively
  20. low-bandwidth links, so please check local archive sites before you
  21. connect to some distant country to fetch something.  If you think the
  22. item you want is popular, ask your local archive site sysadmin, who
  23. may be willing to set up a copy on the local archive.
  24.  
  25. Different archive sites have different forms of etiquette -- if you see
  26. a README or README.TXT file in the ftp directory, please read it.
  27.  
  28. Once you're connected to the remote site via ftp, you can look around
  29. and retrieve files. (Most anonymous ftp sites do not permit people to
  30. store files) The ftp program prompts you with
  31.  
  32. ftp>
  33.  
  34. and offers a few commands that are similar to Unix.  "cd" changes your
  35. directory on the remote machine, "lcd" changes your directory on the
  36. local machine, "get" will get a file, etc. See the manual page for ftp
  37. (use the command "man ftp")
  38.  
  39. Typically, a directory called 'pub' is where the interesting things
  40. are stored. Some sites will have a file with a name like ls-lR, that
  41. contains a complete list of the files on that site. Otherwise, you can
  42. type ls -lR and get such a listing -- for some sites, this can take
  43. a LONG time.  This doesn't work on some sites.
  44.  
  45. Usually, files are grouped in composite "archive" files, so you don't
  46. have to get many small files separately. The most common Unix archive
  47. file format for the Internet is tar, usually indicated by a ".tar"
  48. suffix in the file name.  tar archives can be unpacked by running the tar
  49. command -- you may want to first do a 'tar t' on the file to see what
  50. it contains before unpacking it.
  51.  
  52. Occasionally, people use shell archives (with .shar or .sh suffixes)
  53. instead.  These are Unix Bourne shell scripts, with files encapsulated
  54. in them.  Be careful when unpacking shell archives since they have to
  55. be run through the Bourne shell to unpack them.  The simplest way is
  56. to use the unshar command, if your system has one installed.
  57. Otherwise, you have to delete all the leading text with an editor and
  58. then run the rest of the text through "sh" o unpack the archive.  Make
  59. sure you're in the directory you want the files in before you try
  60. unpacking the archive, since there's no good way to list the contents
  61. of an archive.
  62.  
  63. Files are often stored compressed -- for Unix, the most common form
  64. is the compress program, indicated by a .Z suffix on the file name.
  65.  
  66. Sometimes, people use programs like arc (indicated by a .ARC suffix),
  67. zoo (.ZOO), zip (.ZIP) or lharc (.LZH), which are combined archival
  68. and compression formats. (There are lots of other archive formats -
  69. talk to the systems staff if you encounter them and don't know how to
  70. deal with them) Macintosh archives are often in StuffIt format (.SIT).
  71. In each case, you need the relevant extraction program.  Usually, the
  72. archive site will also have a copy of the extraction program for ftp.
  73. Finally, there's the "self-extracting" archive format, popular in the
  74. PC world -- they look like executable programs (.EXE) and when run,
  75. they unpack the files they contain.
  76.  
  77. When retrieving non-text files, you must use binary mode, otherwise
  78. the file gets messed up. To do this, use the 'binary' command. (It's
  79. safe to set this for text files if the other end is a Unix system,
  80. since Unix doesn't differentiate between text and binary file
  81. representation. If the site at the other end is non-Unix, you may need
  82. to use some other mode -- see the documents for that site and for ftp)
  83.  
  84. An example session follows -- the commands I typed are all underlined
  85. with a row of carets (^^^^) and are usually typed at the % or ftp>
  86. prompt.
  87.  
  88. % ftp ftp.cs.toronto.edu
  89.   ^^^^^^^^^^^^^^^^^^^^^^
  90. Connected to ftp.cs.toronto.edu.
  91. 220 neat.cs FTP server (Version 5.55 Tue Aug 8 22:48:27 EDT 1989) ready.
  92. Name (ftp.cs.toronto.edu:moraes): anonymous
  93.                                   ^^^^^^^^^
  94. 331 Guest login ok, send ident as password.
  95. Password:moraes@cs.toronto.edu
  96.          ^^^^^^^^^^^^^^^^^^^^^
  97. 230 Guest login ok, access restrictions apply.
  98. Remote system type is UNIX.
  99. ftp> dir
  100.      ^^^
  101. 200 PORT command successful.
  102. 150 Opening ASCII mode data connection for /bin/ls.
  103. total 62
  104. drwxr-xr-x  2 0        0             512 Nov 20  1988 bin
  105. drwxr-xr-x 11 0        0            2048 Dec 29 00:45 pub
  106. 226 Transfer complete.
  107. ftp> cd pub
  108.      ^^^^^^
  109. 250 CWD command successful.
  110. ftp> dir
  111.      ^^^
  112. 200 PORT command successful.
  113. 150 Opening ASCII mode data connection for /bin/ls.
  114. total 4523
  115. ...
  116. -rw-r--r--  1 0        0           51251 Sep 16 12:02 ssl.tar.Z
  117. ...
  118. 226 Transfer complete.
  119. ftp> hash
  120.      ^^^^
  121. Hash mark printing on (1024 bytes/hash mark).
  122. ftp> binary
  123.      ^^^^^^
  124. 200 Type set to I.
  125. ftp> get ssl.tar.Z
  126.      ^^^^^^^^^^^^^
  127. 200 PORT command successful.
  128. 150 Opening BINARY mode data connection for ssl.tar.Z (51251 bytes).
  129. ##################################################
  130. 226 Transfer complete.
  131. 51251 bytes received in 0.94 seconds (53 Kbytes/s)
  132. ftp> quit
  133.      ^^^^
  134. 221 Goodbye.
  135.  
  136. Now, to see what ssl.tar.Z contains, I can use:
  137.  
  138. % uncompress < ssl.tar.Z | tar tvf -
  139.   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  140. drwxrwxr-x 7/0        0 Sep 16 11:58 1989 ssl/
  141. -rw-r--r-- 7/0      301 Sep 16 11:58 1989 ssl/Makefile
  142. -rw-r--r-- 7/0      240 Jun  2 01:08 1988 ssl/README
  143. -rw-r--r-- 7/0    20642 Feb 26 21:43 1988 ssl/file.ssl
  144. -rw-r--r-- 7/0     5241 Feb 21 15:25 1988 ssl/file.sst
  145. -rw-r--r-- 7/0    56581 Sep 16 11:57 1989 ssl/ssl.c
  146. -rw-r--r-- 7/0    20642 Feb 26 20:08 1988 ssl/ssl.ssl
  147. -rw-r--r-- 7/0     5241 Feb 26 21:41 1988 ssl/ssl:sst.c
  148. -rw-r--r-- 7/0     5395 Feb 26 21:41 1988 ssl/ssl:sst.h
  149. -rw-r--r-- 7/0    12211 Mar 30 22:34 1988 ssl/sslskel.c
  150. -rw-r--r-- 7/0      274 Feb 26 20:42 1988 ssl/sslskel.ssl
  151. -rw-r--r-- 7/0       55 Feb 26 20:42 1988 ssl/sslskel.sst.c
  152. -rw-r--r-- 7/0     1001 Feb 26 20:42 1988 ssl/sslskel.sst.h
  153.  
  154. To extract the files, I use
  155.  
  156. % uncompress < ssl.tar.Z | tar xvf -
  157.   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  158. ssl/
  159. ssl/Makefile
  160. ssl/README
  161. ssl/file.ssl
  162. ssl/file.sst
  163. ssl/ssl.c
  164. ssl/ssl.ssl
  165. ssl/ssl:sst.c
  166. ssl/ssl:sst.h
  167. ssl/sslskel.c
  168. ssl/sslskel.ssl
  169. ssl/sslskel.sst.c
  170. ssl/sslskel.sst.h
  171.  
  172. ---
  173.