Some notes on ftp-ing. Steve Tinney This version: Friday, August 26, 1988 CONTENTS 0. Preface. 1. Introduction. 2. How to get files using ftp. 3. Summary of file treatment arranged by file extension. 4. Using the zcat family and *unixtar. 5. Some addresses to get started with. 6. Further references. 0. Preface. This file contains all I know about ftp-ing, so if you discover ommissions or errors, let me know and I'll correct them. It is a totally unofficial and unauthorized account, use at your own discretion and at your own risk---I take no legal or financial responsibility etc. etc. Howard Chu read an earlier version of this text and responded with the excellent summary of what to do with files of various extensions which is given below. Howard is not responsible for any errors that remain. 1. Introduction. Ftp stands for `file transfer protocol' and is a widely used means of obtaining files from other sites. It is basically a Unix program but is also implemented on MTS, where the connections from UM seem to be better than those from UB. If you have heard that something is available by `anonymous ftp' then the instructions in this file should help you get it. Throughout this text actual commands you type are given in `quotes', thus. Miscellaneous material that appears on the screen during a session is shown either in "double quotes", thus, or indented where an example is being given. Two prompts may be shown in examples, "#", the MTS prompt and "ftp>", the ftp prompt. Of course, you should not type these. 2. How to get files using ftp. To begin an ftp session type `ftp ' where is the name of the site you wish to contact. If a connection is made successfully, you will be prompted for your id, to which you should reply `anonymous'. You will then be asked to give your real identity as a password. In practice any non-null string is acceptable here. OK, you're in. You probably need to use the `cd' command to get to the directory with the goodies (see section 5 for more details on this). The command to see what is in the current directory is `ls'. Once you've located a file you want to get you must first take care to set the transfer type correctly. See section 3 for how to identify the necessary transfer type from the file extension. After setting the transfer type just do `get ' where is the name of the file you want. To see how things progress use the `hash' command before you do the `get' instruction. That puts a "#" on screen for every 1k transmitted. Often nothing happens for a while, sometimes for ages (>10minutes). In the latter case you may have lost the connection, and then the reset button or the off switch is the only way to recover, as ATTN or BREAK do not currently work whilst you are locked in a file transfer. When you are done with ftp just type `bye'. At any point other than while a file transfer is in progress you can move between mts and ftp simply by typing `mts' at the "ftp>" prompt, and `ftp' at the "#" prompt. This can be useful, but may time you out of ftp if you are in mts for more than a few minutes. To summarize the above, a sample session is given below, in which lines containing something typed by the user are marked with a right angle bracket (>). Don't forget that "#" and "ftp>" are prompts supplied by the machine. > #ftp june.cs.washington.edu um.cc.umich.edu FTP client (Version of Jul 15/88 03:21:37) 220 uw-june FTP server (Version 4.10 Thu Jun 18 16:40:36 EDT 1987) ready. > Name (128.95.1.4:LFKY): anonymous 331 Guest login ok, send ident as password. > Password: [this response will be blanked, type any non-null string] 230 Guest login ok, access restrictions apply. > ftp> ls 200 PORT command okay. 150 Opening data connection for /bin/ls (35.1.1.43,4468) (0 bytes). .emacs_343 bin etc gated ietf netinfo news pub rfc tmp transfig.tar.Z 226 Transfer complete. 81 bytes received in 0.343 seconds (0.23 Kbytes/sec) > ftp> cd /pub 200 CWD command okay. > ftp> ls 200 PORT command okay. 150 Opening data connection for /bin/ls (35.1.1.43,4469) (0 bytes). .emacs_0 portuguese.tar presto.tar.Z psdvi.tar.Z 226 Transfer complete. 1053 bytes received in 4.864 seconds (0.211 Kbytes/sec) > ftp> bin 200 Type set to I. > ftp> hash Hash mode on. > ftp> get portuguese.tar Filename "portuguese.tar" has been truncated to "portuguese.t". 200 PORT command okay. 150 Opening data connection for portuguese.tar (35.1.1.43,4470) (10240 bytes). ########## 226 Transfer complete. 10240 bytes received in 9.383 seconds (1.065 Kbytes/sec) > ftp> bye 221 Goodbye. # 3. Summary of file treatment arranged by file extension. Suffix FTP Type .arc bin If the remote host is a TOPS-20 or DEC-10 .tar bin system, (e.g., simtel20.arpa) use `tenex' .shar ascii instead of binary. If both remote and local .tar.Z bin hosts are Unix systems, use binary for .shar.Z bin everything. .Z bin .arc archives can be handled with a number of programs on MSDOS. xarc, arcx, arce, and pkxarc can all be used to extract the contents of a .ARC archive. arcv can be used to view the contents of the archive. arc and pkarc can be used for the above as well as for general purpose manipulation of archives. On MTS, use the *ARC program. It operates like the MSDOS arc, but must distinguish between binary and text files when handling files in an archive. (See the CC Memo or Volume 2 for more info about *ARC.) .tar archives can be extracted by the tarread program on MSDOS. Pdtar allows general purpose manipulation of tar files. On MTS, use *Unixtar. The tar file must be in an MTS line file with a fixed number of bytes per line, and that number must be a multiple of 512. A fixed record length of 10240 bytes per line is preferred. (.ARC archives must also be of fixed length, but there is no preferred length.) .shar archives are best handled on a Unix system. They can be extracted with the shar program on MSDOS as well. There is no utility on MTS for the purpose of manipulating shar files. By convention, any filename with a ".Z" suffix denotes a file compressed by the Unix compress utility. These files are usually not manageable on an MSDOS machine, due to the amounts of real memory they require for their compression scheme. They can be decompressed on a Unix system with the uncompress command, as well as the zcat command. (See the appropriate Unix man page for details.) They can also be expanded using ZCAT on MTS. .tar.Z files are compressed tar archives. They need to be expanded before being processed with regular tar utilities. On MTS, use ZCAT:zcat-tar. This program will produce output suitable for use with *Unixtar. .shar.Z files are compressed shar archives. These also need to be expanded before regular processing. On MTS, use ZCAT:zcat-asc, which can also be used for any other compressed plain-ASCII-text files. 4. Using the zcat family and *unixtar. The programs on the zcat id should all be run with scards for input and sprint for output. *unixtar can be run interactively by typing `$r *unixtar' then `help', or command-line style eg. #$Run *unixtar par=tar tvf -junk [It will *not* accept tar options preceded by a '-' - e.g., #$Run *Unixtar par=tar -tvf blah will *not* work.] 5. Some addresses to get started with. This list gives the site on the first line, the directory on the next, and some informal notes on content etc. in the final paragraph. If no directory is given try doing a `ls' command and see what that turns up. Look especially for files with names like ``getting.files'' and so on, and get them to read first. If that fails, and the `ls' command didn't reveal any directory names (often recognizable by a .directory suffix), try `cd /pub'. If that too is unsuccessful, you probably need to go back to your source and get the exact name of the directory from which to obtain what you want. =================================================================== site: grape.ecs.clarkson.edu dir: ? pd stuff, like simtel but less complete. This is according to pc1:conf 476:42, but I've never contacted this site. ------------------------------------------------------------------- site: june.cs.washington.edu dir: /pub Home of the Unix TeX distribution, as well as a variety of stuff for doing foreign languages in TeX. Web-to-C, Portuguese TeX, TeXdraw are just a few examples. ------------------------------------------------------------------- site: science.utah.edu dir: various of the form aps: (eg. aps:) Nelson Beebe's collection of .dvi drivers for TeX, plus sundry other materials of interest to TeX users. Most of this is already on the TUG1 id on UM. ------------------------------------------------------------------- site: score.stanford.edu dir: various, see ``getting.tex'', which is also on TUG1:score.info The home of TeX. ------------------------------------------------------------------- site: simtel20.arpa dir: many, eg. pd2:, pd1:. Get hold of the information files and work from there. Huge and varied collection of pd software, for several operating systems and a multiplicity of languages. Be careful to specify `tenex' when getting binary files from this site (see the list above). ------------------------------------------------------------------- site: svax.cs.cornell.edu dir: /pub Fig is being worked on and distributed from here. Untested. Noted for ~ftp/pub/fig/transfig-man.dvi. ------------------------------------------------------------------- site: tut.cis.ohio-state.edu dir: gnu stuff, fast. ------------------------------------------------------------------- site: ucbarpa.berkeley.edu dir: /pub supposedly an alternative source for Makeindex, I've never gotten through here. =================================================================== 6. Further references. The man page is a succinct summary of commands and their functions. See lfky:ftp.man for this. As a general forum for questions there is the conference user:networks, on UM.