home *** CD-ROM | disk | FTP | other *** search
/ The Best Internet Programs / BESTINTERNET.bin / latest / roadmap / map14.txt < prev    next >
Encoding:
Internet Message Format  |  1995-02-08  |  13.1 KB

  1. Date:         Tue, 7 Feb 1995 10:11:56 -0600
  2. From: BITNET list server at UA1VM (1.8a) <LISTSERV@UA1VM.UA.EDU>
  3. Subject:      File: "MAP14 LESSON"
  4.  
  5. MAP14: FTP (PART TWO)
  6.  
  7.  
  8.      "Technology ... the knack of so arranging the world that we need
  9.       not experience it." -- Max Frisch, Homo Faber
  10.  
  11.  
  12. Yesterday I told you that the basic steps in an FTP session are:
  13.  
  14.      1. Start-up your FTP client
  15.      2. Give your FTP client an address to connect to (and, just
  16.         like TELNET, step one and two can be combined into one
  17.         easy step).
  18.      3. Identify yourself to the remote site
  19.      4. Give the remote site your password
  20.      5. Look around the directory for files
  21.      6. Change Directories
  22.      7. Set the transfer mode (optional)
  23.      8. Get the file(s) you want
  24.      9. Quit
  25.  
  26. I've accessed SURAnet's FTP site (ftp.sura.net), told the site that
  27. I am "anonymous", and given the site my full Internet address as
  28. my password.
  29.  
  30. Now that I'm in, I'm going to look around and see what the SURAnet
  31. FTP site has to offer.
  32.  
  33. (BTW, you can see a list of all of the acceptable commands for
  34. your FTP client by typing "help")
  35.  
  36. On most FTP clients, the command to list the contents of the current
  37. directory on the remote machine is just
  38.  
  39.           dir
  40.  
  41. My FTP client accepts and uses the "dir" command, so I type
  42.  
  43.           dir
  44.  
  45. and the following appears on my screen:
  46.  
  47.    >>>PORT 130,160,4,100,212,230
  48.    200 PORT command successful
  49.    >>>LIST
  50.    150 Opening ASCII mode data connection for /bin/ls.
  51.    total 728
  52.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  53.    drwxr-xr-x   2 0        1              512 May 10 12:47 etc
  54.    drwxrwxrwx   6 0        10             512 Oct 21 11:37 incoming
  55.    drwxr-xr-x   2 0        0             8192 Feb 15  1992 lost+found
  56.    -rw-r--r--   1 0        1           350142 Oct 25 00:00 ls-lR
  57.    drwxrwxr-r  24 0        100            512 May  3 13:25 pub
  58.  
  59. This is a listing of all of the stuff in the current directory.
  60. Let's take a look at the first entry and see if we can figure out
  61. what all of this means:
  62.  
  63.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  64.  
  65. If the line begins with a "-" instead of a "d", it is a file.
  66. The letter "d" at the beginning of this example tells me that this
  67. is not a file -- it is a subdirectory.
  68.  
  69. What does *THAT* mean? Well, pretend that the FTP site is simply
  70. a big house. You walk into the house through the front door, and
  71. you find yourself standing in an entry hall. The entry hall may
  72. have some neat stuff in it, but it also has doors leading to other
  73. rooms throughout the house.
  74.  
  75. The subdirectories -- the "d"s -- are just doors to other "rooms"
  76. at the FTP site, and the files -- the "-"s -- are the neat stuff
  77. that you can get while you are at the site.
  78.  
  79. Getting back to our example,
  80.  
  81.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  82.  
  83. the "drwxrwx--x" tells us that this entry is a subdirectory (the
  84. "rwxrwx--x" part is just some security stuff). The "512" tells
  85. us the size of the subdirectory in bytes.  The "Aug  5 01:55" tells
  86. us the date and time that this subdirectory was last updated. The
  87. last part -- the "bin" -- tells us the name of the subdirectory.
  88.  
  89. Let's look at one more example:
  90.  
  91.    -rw-r--r--   1 0        1           350142 Oct 25 00:00 ls-lR
  92.  
  93. There is a "-" instead of a "d", so this is a file. The "350142"
  94. tells us that the size of this file is 350,142 bytes, the file
  95. was last updated at midnight on October 25, and the name of this
  96. file is "ls-lR".
  97.  
  98. Let's get back to the main SURAnet directory contents:
  99.  
  100.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  101.    drwxr-xr-x   2 0        1              512 May 10 12:47 etc
  102.    drwxrwxrwx   6 0        10             512 Oct 21 11:37 incoming
  103.    drwxr-xr-x   2 0        0             8192 Feb 15  1992 lost+found
  104.    -rw-r--r--   1 0        1           350142 Oct 25 00:00 ls-lR
  105.    drwxrwxr-r  24 0        100            512 May  3 13:25 pub
  106.  
  107. I want to change this main directory and get into a subdirectory.
  108. To change directories on most FTP clients, you use the command
  109.  
  110.           cd <directory>
  111.  
  112. and replace <directory> with the name of the directory that you
  113. want to access.
  114.  
  115. Since I am interested in public information, I'm going to get
  116. into "pub" directory ("pub" is the standard FTP abbreviation
  117. for "public"). I type
  118.  
  119.           cd PUB
  120.  
  121. and the following appears on my screen:
  122.  
  123.    >>>CWD PUB
  124.    550 PUB: No such file or directory.
  125.  
  126. Uhhh ... what happened?
  127.  
  128. One of the unfortunate shortcomings of FTP is that, for most of you,
  129. FTP is *case sensitive*. My "cd PUB" command did not work because
  130. there is no "PUB" directory ... but there *IS* a "pub" directory :)
  131.  
  132. Let's try it again. I type
  133.  
  134.           cd pub
  135.  
  136. and the following appears on my screen:
  137.  
  138.    >>>CWD pub
  139.    250 CWD command successful.
  140.  
  141. Cool! It worked!
  142.  
  143. Now I need to see the contents of this new directory that I just
  144. entered. Do you remember what FTP command I should use? (Hint: it is
  145. "dir")
  146.  
  147. I type "dir", and the following appears on my screen:
  148.  
  149.    >>>PORT 130,160,4,100,215,140
  150.    200 PORT command successful.
  151.    >>>LIST
  152.    150 Opening ASCII mode data connection for /bin/ls.
  153.    Total 56
  154.    -rw-rw-r--   1 1023     100           4052 Apr 22  1994 README
  155.    drwxrwsr-x   2 1023     100            512 Aug  6  1993 SURAnet
  156.    drwxrwxr-x   6 1020     120            512 Mar  3  1992 archie
  157.    drwxrwxr-x   2 1034     120            512 Feb 15  1992 articles
  158.    drwxrwxr-x   2 1007     110            512 Jun 22 15:40 books
  159.    ... <stuff deleted by me>
  160.  
  161. Whoa! That first file -- README -- looks pretty important. I bet
  162. it contains some important information that will make my life a
  163. whole bunch easier (Good rule of thumb: if you see a file that
  164. contains the words README or INDEX, it is an important file).
  165.  
  166. I need to get this README file.
  167.  
  168. To get a file using FTP, you use the
  169.  
  170.           get filename
  171.  
  172. command, replacing <filename> with the name of the file that you
  173. want to get. The get command retrieves the file from the remote
  174. site and stores the file on your service provider's system.
  175.  
  176. Since I want to get the README file, I type
  177.  
  178.           get README
  179.  
  180. (making sure to use the correct case), and the following appears
  181. on my screen:
  182.  
  183.    Invalid local filename; use 'name.type.mode' or 'name.type'
  184.  
  185. Now what?!?
  186.  
  187. This is a problem that some of you may have when you try to get
  188. "one word" files. Some local Internet service providers require
  189. files stored on their machines to have some sort of extension or
  190. type. Your can't have a file whose name is just README ... it
  191. has to be README.<type> (i.e. README.DOC, README.TXT, etc).
  192.  
  193. Since the "get README" command did not work, I'm going to have to
  194. use the
  195.  
  196.           get <filename> <name I want it saved as>
  197.  
  198. command, replacing <remote file name> with README, and replacing
  199. <name I want it saved as> with the name that I want the file to
  200. be saved as on my service provider's computer.
  201.  
  202. So, I type
  203.  
  204.           get README README.DOC
  205.  
  206. and the following appears on my screen:
  207.  
  208.    >>>PORT 130,160,4,100,218,90
  209.    200 PORT command successful.
  210.    >>>RETR README
  211.    150 Opening ASCII mode data connection for README (4502 bytes).
  212.  
  213. After a few additional seconds, the following is added to my screen:
  214.  
  215.    226 Transfer complete.
  216.    4637 bytes transferred. Transfer rate 6.14 Kbytes/sec.
  217.  
  218. YIPEE! It worked!! Let's quit FTP and see what we did.
  219.  
  220. To quit ftp, you need to use either the "bye" or "quit" commands.
  221.  
  222. On my client, the command is "quit", so I type
  223.  
  224.           quit
  225.  
  226. and the following appears on my screen:
  227.  
  228.    221 Goodbye.
  229.    Ready; T=0.54/0.96 01:45:53
  230.  
  231. Okay .. I got the file. But where is it? It is sitting on my
  232. account on my service provider's system!
  233.  
  234. Depending on your system, it is either easy or hard to get into
  235. the files that get from FTP (in Unix, type "ls"; in VM, type "fl").
  236. Your local Internet service provider can tell you a little more
  237. about how to access, read, and print these files.
  238.  
  239. Looking at this new file that I just got from FTP, I discover that
  240. the contents of the README file are a brief explanation of what is
  241. in every subdirectory off of the pub directory (cool!):
  242.  
  243.    The following items are available anonymous ftp from
  244.    ftp.sura.net:
  245.  
  246.    Directories found under pub:
  247.  
  248.    archie/          Information on the archie service as well as client
  249.                     software to use archie.
  250.  
  251.    articles/        Text versions of articles in the SURAnet newsletter.
  252.  
  253.    books/           Subdirectory containing information on ordering
  254.                     discounted books through SURAnet.
  255.  
  256.    databases/       The databases in raw format that are also offered
  257.                     through our WAIS server.
  258.  
  259.    dns/             Software and documentation to help setup the Domain
  260.                     Name Server software on Unix machines (BIND)
  261.  
  262.    fdic/            The Federal Deposit Insurance Corporation's ftp
  263.                     archive.
  264.    ... <<stuff deleted by me>>
  265.  
  266. NEAT! :)
  267.  
  268. I want to go back and get one of the articles in the SURAnet newsletter.
  269. Thanks to what I learned from the README file, I now know that the
  270. files that I am looking for are in "pub" directory and in the
  271. "articles" subdirectory.
  272.  
  273. In FTP notation, I can write this as
  274.  
  275.           /pub/articles
  276.  
  277. This means the same thing as saying "in the pub directory, in
  278. the articles subdirectory" and, as you will soon see, this notation
  279. will eventually even save me a few steps.
  280.  
  281. Let's go back to SURAnet and get some newsletter articles!
  282.  
  283. I type
  284.  
  285.           ftp ftp.sura.net
  286.  
  287. and the following appears on my screen:
  288.  
  289.    Connecting to ftp.sura.net 128.167.254.179, port 21
  290.    220 nic.sura.net FTP server (Version wu-2.4(1) Fri May 20 10:20:58
  291.    EDT 1994) ready.
  292.    USER (identify yourself to the host):
  293.  
  294. Since I do not have an account on the SURAnet machine, I type
  295.  
  296.           anonymous
  297.  
  298. and the following appears on my screen:
  299.  
  300.    >>>USER anonymous
  301.    331 Guest login ok, send your complete e-mail address as password.
  302.    Password:
  303.  
  304. I type my full Internet address -- pcrispe1@ua1vm.ua.edu -- as
  305. my password, and the following appears on my screen:
  306.  
  307.    >>>PASS ********
  308.    230-    SURAnet ftp server running wuarchive experimental ftpd
  309.    230-
  310.    230-Welcome to the SURAnet ftp server.  If you have any problems with
  311.    230-the server please mail the to systems@sura.net. If you do have problems,
  312.    230-please try using a dash (-) as the first character of your password
  313.    230- -- this will turn off the continuation messages that may be confusing
  314.    230-your ftp client.
  315.    ...
  316.    230 Guest login ok, access restrictions apply.
  317.    Command:
  318.  
  319. I know that I want to get into the pub directory, and then into
  320. the articles subdirectory. I could type "cd pub" and then "cd articles"
  321. to get into the subdirectory that I want, but it would be easier to
  322. just jump into the "articles" directory with one command.
  323.  
  324. I can make such a jump using the /pub/articles notation introduced a
  325. few minutes ago. If I type
  326.  
  327.           cd /pub/articles
  328.  
  329. I jump straight into the "articles" directory, and the following appears
  330. on my screen:
  331.  
  332.    >>>CWD /pub/articles
  333.    250 CWD command successful.
  334.    Command:
  335.  
  336. Since I have no idea what is in the "articles" subdirectory that I
  337. just entered, I type
  338.  
  339.           dir
  340.  
  341. and the following appears on my screen:
  342.  
  343.    >>>PORT 130,160,4,100,222,127
  344.    200 PORT command successful
  345.    >>>LIST
  346.    150 Opening ASCII mode data connection for /bin/ls.
  347.    Total 382
  348.    -rw-rw-r--   1 0      120          1510 Jan  3  1992 editors.box.text
  349.    -rw-rw-r--   1 0      120         46167 Jan  3  1992 fall91.issue
  350.    -rw-rw-r--   1 0      120         52864 Jan  3  1992 spring91.issue
  351.    -rw-rw-r--   1 0      120          1515 Jan  3  1992 sub.form.txt
  352.    -rw-rw-r--   1 0      120         36418 Jan  3  1992 summer91.issue
  353.    -rw-rw-r--   1 0      120         53606 Jan  3  1992 winter90.issue
  354.    226 Transfer complete
  355.  
  356. COOL! These files already have extensions (winter90.issue, etc.), so
  357. getting them is going to be a breeze!
  358.  
  359. Let's get the Fall '91 issue. Since I want the file "fall91.issue", I type
  360.  
  361.           get fall91.issue
  362.  
  363. and the following appears on my screen:
  364.  
  365.    >>>PORT 130,160,4,100,224,34
  366.    200 PORT command successful
  367.    >>>RETR fall91.issue
  368.    150 Opening ASCII mode data connection for fall91.issue (46167 bytes).
  369.  
  370. After a few seconds, the following is added to my screen:
  371.  
  372.    226 Transfer complete.
  373.    47151 bytes transferred. Transfer rate 16.58 Kbytes/sec.
  374.  
  375. IT WORKED!!! YAY!!! :)
  376.  
  377. I then quit FTP by typing either "bye" or "quit", and I am done!
  378. The file "fall91.issue" is now sitting in my account on my
  379. local Internet service provider's machine!!
  380.  
  381. TOMORROW:
  382.  
  383.      - ASCII and Binary files
  384.      - getting multiple files
  385.      - file compression and unpacking
  386.      - *FTP using nothing but e-mail*
  387.  
  388.  
  389.    PATRICK DOUGLAS CRISPEN    THE VIEWS EXPRESSED IN THIS LETTER DO NOT
  390.     PCRISPE1@UA1VM.UA.EDU      NECESSARILY REPRESENT THE VIEWS OF THE
  391.   THE UNIVERSITY OF ALABAMA      UNIVERSITY OF ALABAMA - TUSCALOOSA
  392.  
  393.       ROADMAP: COPYRIGHT PATRICK CRISPEN 1994. ALL RIGHTS RESERVED.
  394.  
  395.