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

  1. Date:         Tue, 7 Feb 1995 10:11:58 -0600
  2. From: BITNET list server at UA1VM (1.8a) <LISTSERV@UA1VM.UA.EDU>
  3. Subject:      File: "MAP15 LESSON"
  4.  
  5. MAP15: FTPMAIL
  6.  
  7.  
  8.      "The whole of science is nothing more than a refinement of
  9.       everyday thinking." -- Albert Einstein, Out of My Later Years
  10.  
  11.  
  12. Before we get to FTPmail, there are a few other things that I
  13. want to discuss.
  14.  
  15. Yesterday I showed you how to retrieve a text file using FTP.
  16. But how can a text file written on an IBM be read on an Apple
  17. Macintosh or on a Unix workstation? Its easy -- thanks to something
  18. called ASCII.
  19.  
  20. ASCII is the American Standard Code for Information Interchange,
  21. and it is the standard format for transmitting textual data.
  22. *Any* computer can read an ASCII text file. Without going too
  23. in-depth into how ASCII works, let's just say that ASCII ensures
  24. that the text in an ASCII text file will appear the same on any
  25. computer regardless of the computer's brand name or operating
  26. system.
  27.  
  28. ASCII is fine and dandy for saving and transferring text files,
  29. but it won't work with non-text, data files -- like computer
  30. programs. Data files must be saved in "Binary" (which is just
  31. a bunch of zeros and ones).
  32.  
  33. Binary files are files that can only run on certain machines
  34. or programs. Good examples of Binary files include shareware
  35. software, Microsoft Word files, Microsoft Powerpoint presentations,
  36. satellite weather images, and sound files.
  37.  
  38. Remember, ASCII files are just 'plain' text files that can be
  39. read on any computer, and Binary files are files that can only
  40. be run on certain computers or programs.
  41.  
  42.  
  43. Unfortunately, there is no universal default transfer mode
  44. for FTP clients. Some clients use ASCII as the default, and
  45. others use binary. This means that unless you tell your FTP
  46. client to do otherwise, all of your files will be transferred
  47. in the default transfer mode.
  48.  
  49. If your client's default transfer mode is ASCII and you try to
  50. retrieve a Binary file without first resetting the transfer mode,
  51. your Binary file will be transferred in ASCII and the file *WILL
  52. NOT WORK* once you get it.
  53.  
  54. Fortunately, changing the transfer mode in FTP is easy. All that
  55. most of you have to do to change the FTP transfer mode from ASCII
  56. to Binary is type
  57.  
  58.           binary
  59.  
  60. right before you get the file, and the file will be transferred to
  61. you in Binary format.
  62.  
  63. To change back to ASCII transfer mode, just type
  64.  
  65.           ascii
  66.  
  67. and FTP will reset its transfer mode to ASCII.
  68.  
  69. If you ever forget what transfer mode you are currently using --
  70. something that I do *ALL* of the time -- all you need to do is
  71. type
  72.  
  73.           status
  74.  
  75. and your computer will display a whole bunch of information,
  76. including your transfer mode :)
  77.  
  78. BTW, how can you tell if a file is an ASCII file or a Binary
  79. file? Well, take a look at the extensions (remember, an extension
  80. is the stuff at the end of the file name -- the extension for
  81. CRISPEN.DOC is .DOC; the extension for SQUIRREL.TXT is .TXT).
  82. If the file's extension is .doc or .txt, or if the file does
  83. not have an extension, it is a good bet that the file is an
  84. ASCII text file. If the file has a weird extension -- like .gif
  85. or .zip -- it is a good bet that the file is a Binary file.
  86. There are, of course, always exceptions to this rule.
  87.  
  88. The "duck theory" also works pretty well in determining if a
  89. file is an ASCII or Binary file. The duck theory says that if
  90. it looks like a duck, waddles like a duck, swims like a duck,
  91. quacks like a duck, and is seen hanging around with other
  92. ducks ... it is probably a duck.
  93.  
  94. Using the duck theory to determine if a file is an ASCII or
  95. Binary file, you can safely assume that if you have a file that
  96. looks like a ASCII text file and is seen in the same directory
  97. as other ASCII text files, you can safely assume that the file
  98. that you are looking at is, in reality, a DUCK :)
  99.  
  100. (First squirrels ... now ducks ... this workshop is getting to me)
  101.  
  102.  
  103. MULTIPLE FILE TRANSFERS:
  104.  
  105.  
  106. How can you transfer multiple files at the same time? Simple! Use
  107. the "mget" (multiple get) command!
  108.  
  109. Let's say that I want to get every file in a particular directory
  110. with the word "duck" in it. I would type
  111.  
  112.           mget duck*
  113.  
  114. The * (a.k.a. "splat") is a "wild card" that tells the client to
  115. get every file that begins with the word "duck" and that has
  116. any additional characters after the word "duck".
  117.  
  118. The best way to explain wildcards is to give you an example. Let's
  119. pretend that I have a directory with the following files in it:
  120.  
  121.      duckreport.doc          ducket.exe
  122.      duck1.txt               duck2.txt
  123.      ducksoup                duck.gif
  124.  
  125. Where I place the wildcard in my mget command will determine
  126. what files I get:
  127.  
  128.      mget command:         files it would retrieve:
  129.  
  130.      mget duck*            duckreport.doc; ducket.exe; duck1.txt;
  131.                            duck2.txt; ducksoup; duck.gif
  132.      mget duck*.txt        duck1.txt; duck2.txt
  133.      mget duck.*           duck.gif
  134.  
  135. Before you continue on, take a minute and try to figure out why
  136. each of the mget commands retrieved different files. If you can
  137. figure it out -- and believe me folks, this is EASY -- you will
  138. be a master of the mget command :)
  139.  
  140.  
  141. FTPMAIL:
  142.  
  143.  
  144. If your local Internet service provider does not have an FTP
  145. client, you can still get FTP files by using a tool called
  146. FTPmail!
  147.  
  148. The steps in a basic FTPmail session are pretty easy:
  149.  
  150.      1. Write an e-mail letter to an FTPmail site near
  151.         you, and put the necessary FTPmail commands
  152.         in the BODY of your letter.
  153.      2. The FTPmail site will write you back and tell you that
  154.         it has received your request, and will tell you the
  155.         number of requests ahead of yours (I still think that
  156.         the number that they give you is just a random, large
  157.         number (but I am probably mistaken)).
  158.      3. A day or two later -- yes, I said "day" -- the FTPmail
  159.         system will e-mail you the file that you requested.
  160.         The FTPmail system will also send you a copy of the
  161.         "transaction" as it occurred between FTPmail and the
  162.         remote FTP site (this transaction will look a lot
  163.         like the examples in yesterday's lesson).
  164.  
  165. Today, I am going to show you how to get ASCII text files using
  166. FTPmail. We'll talk about Binary files tomorrow.
  167.  
  168. The first step is finding an FTPmail site near you. FTPmail
  169. was developed at the Digital Western Research Laboratory, and
  170. their FTPmail address -- ftpmail@decwrl.dec.com -- is the most
  171. widely known (and widely used) FTPmail address in the world.
  172. Unfortunately, because of the traffic that this site sees, the
  173. decwrl address is also sometimes the slowest FTPmail site in
  174. the world :(   <--- a frowning smiley
  175.  
  176. There are other FTPmail servers around the world that may be
  177. closer to you, and that may actually be faster that the decwrl
  178. address:
  179.  
  180.           Australia      ftpmail@cs.uow.edu.au
  181.           France         ftpmail@grasp.insa-lyon.fr
  182.           Germany        ftpmail@ftp.uni-stuttgart.de
  183.           Great Britain  ftpmail@doc.ic.ac.uk
  184.           Ireland        ftpmail@ieunet.ie
  185.           Sweden         ftpmail@lth.se
  186.           USA            ftpmail@sunsite.unc.edu
  187.           USA            ftpmail@ftp.uu.net
  188.           USA            ftpmail@decwrl.dec.com
  189.  
  190. Once you have found a site closest to you, you are ready to start
  191. sending commands to the FTPmail address! The commands, just like
  192. all of the LISTSERV commands that I drilled into your head earlier
  193. in the workshop, need to be in the BODY of your e-mail letter.
  194.  
  195. The body of you letter to the FTPmail site will actually have SEVERAL
  196. commands in it. The basic FTPmail commands are, in order:
  197.  
  198.        reply <your Internet address>
  199.           This tells FTPmail where to send the file(s) to.
  200.  
  201.        connect <ftp site address>
  202.           This tells FTPmail the site that you want it to
  203.           connect to.
  204.  
  205.        <transfer mode>
  206.           This tells FTPmail if you want the files in ASCII or
  207.           binary
  208.  
  209.        chdir <directory>
  210.           This tells FTPmail in which directory the file that we want
  211.           is located.
  212.  
  213.        get <filename>
  214.           This tells FTPmail to get a specific file.
  215.  
  216.        quit
  217.           Ends the FTPmail session
  218.  
  219. Yesterday, we ftp'd to ftp.sura.net, got into the /pub/articles
  220. directory, and got the file fall91.issue
  221.  
  222. To do this using FTPmail, I need to send an e-mail a letter to
  223. ftpmail@sunsite.unc.edu (or to any other FTPmail site), and the
  224. body of my letter would look like this:
  225.  
  226.           reply pcrispe1@ua1vm.ua.edu
  227.           connect ftp.sura.net
  228.           ascii
  229.           chdir /pub/articles
  230.           get fall91.issue
  231.           quit
  232.  
  233. NOTE: IF YOU SEND THIS TO AN FTPMAIL SITE WITHOUT CHANGING THE
  234. REPLY-TO ADDRESS, THE FTPMAIL SITE WILL SEND THE FILE TO *ME*,
  235. NOT TO YOU. PLEASE CHANGE THE REPLY TO ADDRESS :)
  236.  
  237. A day or two after I send this letter to the FTPmail address,
  238. I should see the file sitting in my e-mail box. Notice that I
  239. said "should." The traffic at the various FTPmail sites is
  240. often incredible, and sometimes requests get lost. If this
  241. happens to you, you should just send your request again :)
  242.  
  243. By the way, the "dir" command works just as well in FTPmail as
  244. it does in regular FTP! All you have to do is add the command
  245. "dir" after the "chdir" command:
  246.  
  247.           reply pcrispe1@ua1vm.ua.edu
  248.           connect ftp.sura.net
  249.           ascii
  250.           chdir /pub/articles
  251.           dir
  252.           quit
  253.  
  254.  
  255. TOMORROW:  - FTP File Compression/Decompression
  256.            - Binary files via FTPmail
  257.            - A few more FTPmail commands (i.e. chunksize).
  258.  
  259. HOMEWORK:
  260.  
  261.      1. If you do not have FTP access through your local
  262.         Internet service provider,
  263.  
  264.         a. find the address of the nearest FTPmail site
  265.            from the list above
  266.         b. send a letter to that FTPmail site with the word
  267.            HELP in the body of your letter
  268.         c. ask your local Internet service provider if
  269.            they have any size limits on messages to and
  270.            from the Internet.
  271.  
  272.      2. If you *do* have FTP access through your local Internet
  273.         service provider, make sure that you
  274.  
  275.         a. know how to access your FTP client
  276.         b. know the commands that your client allows
  277.         c. review MAP13 and MAP14
  278.  
  279.  
  280.    PATRICK DOUGLAS CRISPEN    THE VIEWS EXPRESSED IN THIS LETTER DO NOT
  281.     PCRISPE1@UA1VM.UA.EDU      NECESSARILY REPRESENT THE VIEWS OF THE
  282.   THE UNIVERSITY OF ALABAMA      UNIVERSITY OF ALABAMA - TUSCALOOSA
  283.  
  284.       ROADMAP: COPYRIGHT PATRICK CRISPEN 1994. ALL RIGHTS RESERVED.
  285.  
  286.