head 2.0; access; symbols; locks grog:2.0; strict; comment @.\" @; 2.0 date 94.12.22.11.53.15; author grog; state Exp; branches; next ; desc @@ 2.0 log @checked in with -k by grog at 1995年01月09日 13:22:41 @ text @.\" For emacs, this file is in -*- nroff-fill -*- mode .\" $Id: getting-sources.ms,v 1.28 1994年12月22日 11:53:15 grog Exp grog $ .\" $Log: getting-sources.ms,v $ .\" Revision 1.28 1994年12月22日 11:53:15 grog .\" Minor mods for bignuts macros .\" .\" Revision 1.27 1994年12月14日 14:52:05 grog .\" Minor mods .\" .\" Revision 1.26 1994年12月06日 11:53:15 grog .\" Minor mods .\" .\" Revision 1.25 1994年12月01日 15:34:42 grog .\" Minor mods .\" .\" Revision 1.24 1994年11月30日 11:57:45 grog .\" Tidy up. .\" .\" Revision 1.23 1994年11月15日 13:18:58 grog .\" Minor mods .\" .\" Revision 1.22 1994年11月07日 17:14:21 grog .\" Minor mods .\" .\" Revision 1.21 1994年09月01日 13:30:58 grog .\" Snapshot 1 September 1994 .\" .\" Revision 1.20 1994年08月25日 17:09:00 grog .\" Change all names from .roff to .ps, set uniform version number 1.20, minor mods .\" .\" Revision 1.4 1994年08月07日 12:00:30 grog .\" Change global.defs to global.roff .\" .\" Revision 1.3 1994年06月09日 13:33:19 grog .\" Get globals right .\" .\\" Revision 1.2 1994年06月07日 15:57:23 grog .\\" Change global file to global.defs .\\" .\" Revision 1.1 1994年05月11日 17:20:31 grog .\" Initial revision .\" .so global.ms .Se \*[nchgetting] "Getting Sources" .St "Getting sources ($Date: 1994年12月22日 11:53:15 $)" Before you can port software, you need software to port. In many cases, there is no problem: somebody comes to you with a tape and says "port this". In other cases, you may know of a specific product, but not know how to find it. Typical problems are: .Ls B .Li You may know what the product should do, but you don't know any product that fits the bill. .Li You may know of a product by name, but not know where to find it. .Li You may know where the product is, but you don't know how to get at it. .Le In this chapter, we'll examine each of these points in detail. .Ah "Finding what software is available" .XX "software, finding" The most difficult problem can be stated something like "Hey, this new Datex-J datacomm service from Telekom looks interesting. I wonder if anybody has written a UNIX driver for it". .LP Finding this kind of package can be a matter of trial and error. However hard you search, you can never be sure that you will find everything you're looking for. Just because somebody has written software for it doesn't mean that he has published it. If he has published it, there is no one place where he might have done so. In the following sections, we'll look at methods to make the search as complete as possible. .Bh "Finding software via the Internet" If you have an Internet connection,\** .FS If you don't have an Internet connection, you should get one. There's a wealth of information available out there. See [Estrada 93] for details. .XX "Estrada, Susan" .FE there are a number of places that can help you locate software both on and off the net: .Ls B 3 .Li The Usenet hierarchy \fIcomp.sources\fR .XX "comp.sources" consists of a number of news groups dedicated to dissemination of source code. Most of these publish indices of past publications. .Li The newsgroup \fIcomp.archives\fR carries announcements of archive .XX "comp.archives" sites and their contents. .Li Find and read an appropriate FAQ. FAQ stands for .XX "FAQ" .XX "frequently asked questions" Frequently Asked Questions: many newsgroups collect answers to recurring questions in the hope of reducing traffic in the newsgroups, and distribute them at regular intervals. The quality varies, of course, but there is an immense wealth of information to be gained if you have time to read them all. In particular, you should check the newsgroup \fInews.answers\fR, .XX "news.answers" to which most FAQs get copied. One good place to start is the FAQ \fIHow to find sources\fR, .XX "how to find sources" .XX "sources, how to find" maintained by Kent Landfield, which is posted to \fIcomp.sources.wanted\fR and many other newsgroups, .XX "comp.sources.wanted" .XX "Landfield, Kent" .IP If you use the Internet for your search, you should make a rule of reading the FAQs before doing anything else. Things change much more quickly in the Internet than in print, and there is no way that a printed book can stay up to date with the Internet. .Li \f(BIIf all else fails\fR, send a request to a related newsgroup asking for further information. Possible ways to identify such a group might be: .Ls B .Li There's a very good chance that you will get a pointer to an appropriate newsgroup from one of the FAQs. .Li If you don't find a FAQ even remotely related to your topic, there are a number of FAQs relating to the problem of getting your question answered. In particular, the \fIList of Periodic Informational Postings\fR .XX "list of periodic informational postings" .XX "periodic informational postings, list of" (currently in 7 parts) is published at regular intervals on \fInews.lists\fR and \fInews.answers\fR, .XX "news.answers" and can probably help you find a newsgroup related to your question. .Li If none of this helps, try \fIcomp.sources.wanted\fR. .XX "comp.sources.wanted" .Le Whichever news group you choose to ask, it should really be a last resort: the newsgroups are already flooded with unecessary messages, and overloading them drives off people who might be able to help. .Le .XX "comp.sources" .XX "internet" .XX "FAQ" .Bh "Software on CD-ROM" Even if you have good access to the Internet, software on \fICD-ROM\fRs is an interesting alternative. \fICD-ROM\fR stands .XX "CD-ROM" for Compact Disk Read-Only Memory, and is a means of storing digital data on a compact disk medium. Current technology stores up to 660 MB per CD-ROM. A number of vendors offer free software on CD-ROM, notably Prime Time Freeware and Walnut Creek. This should not be taken as an endorsement of these companies, but they appear to be the most active. Proprietary software is also becoming increasingly available on CD-ROM. We'll look at CD-ROMs in more detail in \*[charchive]. .LP .Ah "Finding available software" Once you know what your product is and have a name for it, things are significantly simpler. Before you go out on the net looking for it, however, look on your local system! Your system administrator will thank you: if it's a popular package (say, \fIgcc\fR or \fIemacs\fR), there's a good chance that somebody else has already copied it to your system. On large systems, it's not uncommon to find lots of disk space taken up by multiple copies of such packages in private directories. .LP If you got the product name via the Net, the same source will probably give you information about where it is available. If not, there are a number of net tools that can help you. .Bh archie .XX archie \fIarchie\fR is a network accessible database retrieval system specifically designed to locate software packages. An archie server stores information about the contents of files available on thousands of publicly accessible sites around the world. You can access it via \fItelnet\fR, via email or directly via an \fIarchie\fR client. .LP There are a number of \fIarchie\fR servers spread around the world. As always in the net, you should use the one closest to you. If you don't know where the closest one is, you can read your FAQ, in this case the \fIAnonymous FTP FAQ\fR or the \fIHow to find sources\fR FAQ, or you .XX "sources, how to find" .XX "how to find sources" can ask \fIarchie\fR with the \f(CWserver\fR command. At the time of writing, the following servers were available: .Ts "Some archie servers" .XX "archie, available servers" .TS H center, linesize(2), tab(#) ; lfCWp7 | lfCWp7 | lfR . Server name#IP address#Country _ .TH N archie.au#139.130.4.6#Australia archie.edvz.uni-linz.ac.at#140.78.3.8#Austria archie.univie.ac.at#131.130.1.23#Austria archie.uqam.ca#132.208.250.10#Canada archie.funet.fi#128.214.6.100#Finland archie.th-darmstadt.de#130.83.128.118#Germany archie.ac.il#132.65.6.15#Israel archie.unipi.it#131.114.21.10#Italy archie.wide.ad.jp#133.4.3.6#Japan archie.kr#128.134.1.1#Korea archie.sogang.ac.kr#163.239.1.11#Korea archie.rediris.es#130.206.1.2#Spain archie.luth.se#130.240.18.4#Sweden archie.switch.ch#130.59.1.40#Switzerland archie.ncu.edu.tw#140.115.19.24#Taiwan archie.doc.ic.ac.uk#146.169.11.3#United Kingdom archie.unl.edu#129.93.1.14#USA (NE) archie.internic.net#198.48.45.10#USA (NJ) archie.rutgers.edu#128.6.18.15#USA (NJ) archie.ans.net#147.225.1.10#USA (NY) archie.sura.net#128.167.254.179#USA (MD) archie.hana.hm.kr#128.134.1.1#Korea .TE .Te When you read the documentation, you could get the impression that the preferred way to access \fIarchie\fR is via telnet. There are several reasons to prefer mail access, however: .Ls B .Li \fIarchie\fR is very talkative. If you look for a popular package like \fIgcc\fR, you will get hundreds of site names each with hundreds of files that match the pattern \fIgcc\fR. In this case, it's definitely a good idea to be more specific (in fact, in this case it's a good assumption that the nearest archive site already has \fIgcc\fR, so you don't need \fIarchie\fR at all). Even with relatively unknown packages, however, \fIarchie\fR can give you back much more than you ever wanted to know. .Li Mail access allows you to use wild card searches, which are not supported in the telnet version. .Li \fIarchie\fR servers are a limited resource. While you're evaluating the output from the last command, you're also tying up a connection. This makes it more difficult for other people to connect to the server. This can happen to you, too: you may often get a message that all connections are in use. .Li Even when you get through to \fIarchie\fR, the response times might be long enough to put you to sleep. .Le We'll look at mail access first, and then consider the other alternatives. .Ch "archie via Mail" To access \fIarchie\fR by mail, you send the message to the user \f(CWarchie\fR at one of the \fIarchie\fR server sites. For example: .LP I heard that a version 5 of \fIperl\fR is available, and I also saw something on the net about a GNU Pascal compiler \fIgpc\fR. For some reason, \fIgpc\fR wasn't on the Free Software Foundation archive on \fIprep.ai.mit.edu\fR, so I needed to find out where it is. To look for these, I sent out the following message: .Ps $ \f(CBmail archie@@archie.th-darmstadt.de \f(CBpath grog@@lemis.de \fIset return address\f(CB find perl \fIinfo about perl\f(CB find gpc \fIinfo about gpc\f(CB help \fIsend help servers \fIsend list of servers\f(CB .Pe Each command starts in the first column of a new line. The \fIfind\fR commands ask archie to search the database for the specified texts \fIperl\fR and \fIgpc\fR. .XX "gpc" These texts can be regular expressions, as we will see later. Since I didn't know the exact naming convention or version number for either, I couldn't be more specific. I also asked for help and a server list. .LP The reply took nearly a day to come, and when it did, it was 1641 lines long. Even so, it was obviously only a partial list: nearly all the hosts were in Europe. More significantly, there was no information at all about \fIperl\fR version 5, although versions can be found outside Europe. .LP The information for \fIgpc\fR was vague--here's a partial list: .Ps Host src.doc.ic.ac.uk (146.169.2.10) Last updated 22:11 23 Feb 1994 Location: /computing/internet/ietf/92mar FILE -r--r--r-- 2882 bytes 00:00 20 Apr 1992 bgpcidr-minutes-92mar.txt.Z Host ftp.umu.se (130.239.8.88) Last updated 21:39 5 Mar 1994 Location: /src/X11R5_mit/mips/demos DIRECTORY drwxr-xr-x 2048 bytes 01:00 4 Aug 1993 gpc Host ftp.uni-bayreuth.de (132.180.8.29) Last updated 22:23 27 Feb 1994 Location: /pub/packages/gnu/gnuplot FILE -r-xrwx--- 43652 bytes 23:00 13 Jun 1993 gpcard.ps.Z Host ftp.zdv.uni-mainz.de (134.93.178.128) Last updated 04:32 2 Feb 1994 Location: /pub/gnu/gpc FILE -r--r--r-- 627744 bytes 18:11 20 Jan 1994 gpc-2.5.7-jan20.tar.gz Host src.doc.ic.ac.uk (146.169.2.10) Last updated 22:11 23 Feb 1994 Location: /gnu/pascal FILE -r--r--r-- 25856 bytes 20:24 20 Jan 1994 GPC.GUIDE.Z .Pe In this case I found what I was looking for--it was, in fact, on a large number of European sites. I also found a lot of things I wasn't looking for. This output is typical of \fIarchie\fR: with as general a name as \fIgpc\fR, you can't help getting a lot of noise as well. With a mail request, you \fIcould\fR use a wild card, but that assumes you know something about what the name looks like. The result could equally well be that you don't find what you are looking for. .Ch "archie via telnet" .XX "archie, via telnet" .XX "telnet, archie via" To access \fIarchie\fR via telnet, simply telnet to the \fIarchie\fR node: .Ps $ \f(CBtelnet archie.sura.net\f(CW Trying 128.167.254.179... Connected to archie.sura.net. Escape character is '^]' SunOS UNIX (nic.sura.net) login: \f(CBarchie\f(CW \fI\&...usual login blurb\f(CW archie> .Pe At this point, you can enter any \fIarchie\fR command in the same format as it would go into a mail message. .Ch "archie via client" If you have the \fIarchie\fR client installed on your system, you can use it to send the request directly. The client supports only a limited number of commands, but the interface is relatively easy to use. For example, to look for \fIgpc\fR I might have entered .Ps $ \f(CBarchie -m10 -c gpc .Pe This tells \fIarchie\fR to return a maximum of 10 file names (\f(CW-m10\fR), and to search for file names that contain (\f(CW-c\fR) the text \fIgpc\fR. If no limit is specified, \fIarchie\fR returns up to 95 matches. .LP There are a number of other options that can be used for an \fIarchie\fR client. They are described in detail in the \fIarchie\fR documentation. Here are the more important ones: .Ls B .Li \f(CW-c\fR tells \fIarchie\fR to search for file names that contain the exact text specified. By default, the names must match exactly. .Li \f(CW-r\fR tells \fIarchie\fR that the text is a UNIX regular expression, which implies a wildcard search. .Li \f(CW-s\fR tells \fIarchie\fR to search for file names that contain the exact text specified, but to ignore case. .Li \f(CW-h\fR \fIhost\fR tells \fIarchie\fR to connect to host \fIhost\fR. The default is normally set via the environment variable \f(CWARCHIE_HOST\fR. .Le .\" XXX do we really need this? .\" .Ch "archie command summary" .\" Using \fIarchie\fR is supposed to be easy enough that you don't need a .\" command summary. To quote the help text, .\" .Ps .\" "Quick and dirty" summary .\" ------------------------- .\" .\" For those of you who want to get something done now and read the .\" rest of this later, send the email to an archie server with the .\" line: .\" .\" find .\" .\" (where is the name of the file you are looking for). You .\" should get a message back with results of your search. If you .\" want to be a bit more sophisticated, read on.... .\" .Pe .\" \fIarchie\fR commands consist of a keyword, optionally followed by .\" parameters, one per line. The more important ones are: .\" .IP "\f(CWhelp \fItopic\fR" 15 .\" .XX "archie, help command" .\" Send the help text. If you specify the optional argument \fItopic\fR, only the .\" help for that topic is returned. You can restrict the topic further restricted .\" by specifying a subtopic; for example, \f(CWhelp set maxhits\fR returns help on .\" the subtopic 'maxhits' of topic .\" 'set', not on two separate topics. .\" .IP "\f(CWfind \fIpattern\fR" 15 .\" .XX "archie, prog command" .\" Return a list of files matching \fIpattern\fR. \fIpattern\fR is interpreted in .\" different ways depending on the value of the variable \fIsearch\fR. For backward .\" compatibility, the server also understands the synonym \fIprog\fR instead of .\" \fIfind\fR. .\" .IP "\f(CWlist [\fIpattern\fR]\fR" 15 .\" .XX "archie, list command" .\" List the names of the sites in the \fIarchie\fR database. The optional .\" \fIpattern\fR is a regular expression describing the sites that should be .\" listed. If no \fIpattern\fR is entered, all sites are listed. As we saw in the .\" example above, not all sites are archived on all servers, so this command is .\" more useful than it might at first appear. .\" .IP "\f(CWmanpage \fIformat\fR\fR" 15 .\" .XX "archie, manpage command" .\" Send the \fIarchie\fR man page. \fIformat\fR can be \fIroff\fR (i.e. \fInroff\fR .\" format) or \fIASCII\fR. The default value is \fIASCII\fR. .\" .IP "\f(CWpath \fIaddress\fR" 15 .\" .XX "archie, path command" .\" Set the return address for the reply, instead of the default of returning to the .\" sender. .\" .IP "\f(CWservers\fR" 15 .\" .XX "archie, servers command" .\" Display a list of all \fIarchie\fR servers worldwide. .\" .IP "\f(CWset \fIvariable\fR \fIvalue\fR" 15 .\" .XX "archie, set command" .\" Set the specified \fIvariable\fR to \fIvalue\fR. We'll look at this in .\" more detail in the next section. .\" .IP "\f(CWshow [\fIvariable\fR...]\fR" 15 .\" .XX "archie, show command" .\" Show the value of \fIvariable\fR (defaults to showing all variables). .\" .IP "\f(CWunset \fIvariable\fR" 15 .\" .XX "archie, unset command" .\" Unset the specified \fIvariable\fR. The subsequent value of the variable is .\" defined on a \fIvariable\fR-specific basis. .\" .IP "\f(CWwhatis \fIsubstring\fR" 15 .\" .XX "archie, whatis command" .\" Search the Software Description Database for the given substring, ignoring case. .\" This database consists of names and short descriptions of many software .\" packages, documents (like RFCs and educational material), and data files stored .\" on the Internet. The database is currently maintained by hand and may not be .\" completely up-to-date. .\" .LP .\" \fIarchie\fR's behaviour can be modified by a number of variables that may be .\" manipulated with the \fIset\fR, \fIshow\fR and \fIunset\fR commands. Here are .\" the more interesting ones: .\" .IP "\f(CWmaxhits\fR" 15 .\" .XX "archie, maxhits command" .\" Limit the number of "hits" (i.e. file names) that the \fIfind\fR command .\" returns. This can be between 1 and 1000, and defaults to 1. It can be useful to .\" limit the volume of the responses if you are reasonably sure that your keyword .\" is unambiguous. .\" .IP "\f(CWmaxhitspm\fR" 15 .\" .XX "archie, maxhitspm command" .\" Maximum number of "hits" per filename specified in the find command. .\" .IP "\f(CWmaxmatch\fR" 15 .\" Maximum number of filenames to return with the find command. This is \fInot\fR .\" the same as maxhits, which limits the total number of file names returned. .\" .IP "\f(CWmax_split_size\fR" 15 .\" The approximate maximum size in bytes of a mail reply. If the reply gets larger .\" than this, it will be split into multiple messages. .\" .IP "\f(CWcompress\fR" 15 .\" This variable defines whether the reply is compressed or not. \f(CWset compress .\" compress\fR sets compression, \f(CWset compress none\fR (the default) turns it .\" off. Compression is done with the standard UNIX \fIcompress\fR .\" .XX "compression, archie" .\" .XX "archie, compression .\" program (see \*[chunpack], page \*[compress] for more details). .\" .IP "\f(CWencode\fR" 15 .\" This specifies the type of post-compression encoding the user can specify when .\" mailing back output. \f(CWset encode uuencode\fR specifies \fIuuencode\fR .\" compression (see \*[chcare], page \*[]), \f(CWset .\" .XX "uuencode" .\" encode none\fR leaves the output in raw binary form, which can .\" seriously confuse many mailers. This variable is only meaningful if .\" data compression has been selected with the \fIcompress\fR variable. .\" .IP "\f(CWoutput_format\fR" 15 .\" This specifies the format in which the \fIfind\fR and \fIlist\fR .\" commands reply. Possible format specifiers are \f(CWmachine\fR .\" (machine readable), \f(CWterse\fR and \f(CWverbose\fR. The .\" default is \f(CWverbose\fR. .\" .IP "\f(CWsearch\fR" 15 .\" This specifies the manner in which \fIfind\fR searches the database. .\" .XX "find" .\" It can have the following values: .\" .Ls B .\" .Li .\" \f(CWexact\fR is the fastest and the least useful: the filename .\" must be exactly the specified string, including case. .\" .Li .\" \f(CWsubcase\fR is similar to \f(CWexact\fR, except that .\" the string must be a substring of the file name. Case is still .\" significant. .\" .Li .\" \f(CWsub\fR is like \f(CWsubcase\fR, but case is no longer .\" significant: for example, \fIfoo\fR matches \f(CWfoobar\fR and .\" \f(CWFOOBAR\fR. .\" .Li .\" \f(CWregex\fR does a regular expression search (the \fIed(1)\fR .\" flavour). .\" .Le .\" .RE .\" In addition, the combinations \f(CWexact_sub\fR, \f(CWexact_subcase\fR and .\" \f(CWexact_regex\fR tell \fIarchie\fR to try an exact search first, and only to .\" try the second kind of search if no matches are found with the exact search. .\" .XE "archie commands" .Ah "Getting the software home" Once you have found your software on the net, you still need to get it to your system. There are a number of ways to do this, depending on what connections you have. Transferring via \fIftp\fR is the swinging way to go, but it's not always the best choice. Let's look at the alternatives: .Bh CD-ROM We've already mentioned CD-ROM as an alternative to searching the net. Once you find something on the net, you might still consider if the software is available on CD-ROM. .Bh Snailnet .XX sneakernet .XX snailnet The term \fISnailnet\fR doesn't really exist (well, unless I just invented it), which is probably indicative of how interesting people find it. \fISneakernet\fR is a name given to transferring data down the hall via floppies or tape rather than by LAN; moving data from one city to another via tape could conceivably be called Snailnet\**, .FS The term \fIsnail\fR .XX "snail" derives from a jargon term for paper mail--see the Jargon file (\fIjargon/jargon.txt\fR on the companion CD-ROM) for further details. .FE but this method of file transfer is not popular enough for the name to catch on. .XX "tape, obtaining software on" .XX "software, obtaining on tape" .LP In fact, sending tapes by mail is not a bad idea. Yes, it takes a day or two, but so does \fIftp\fRing a lot of data across the Internet. In addition, it's a lot less work: if you copy several hundred megabytes of data via \fIftp\fR, the first thing you are likely to do with it is to write it to tape anyway, until you have time to do something with it. A tape from a server is also a lot more up to date than anything you can get on CD-ROM. Unless you really need \fItoday\fR's version of \fIxfoo\fR, getting software via tape might be the best choice. .Bh uucp .XX "uucp" \fIuucp\fR (Unix to Unix copy) used to be \fIthe\fR way to copy UNIX files from one system to another. Nowadays it's a poor second to TCP/IP based programs such as \fIftp\fR. It's a pain to use, a pain to administer, and there are fewer and fewer sites that support it. In addition, you need a point-to-point connection to the host, which can be really expensive if the host happens to be at the other end of the world. Apart from that, it provides functions similar to those of \fIftp\fR. .LP This doesn't mean that you should ignore \fIuucp\fR. It may not be much use, but there are two things you can do with it: .Ls B .Li Since it doesn't offer the flexibility of TCP/IP, it can transfer faster, up to 99% of the line speed. If your mail feed is a long distance call, you will appreciate that. .Li \fIuunet\fR offers an archive accessible via \fIuucp\fR. You can either subscribe, in which case you will be given a number with 800 prefix to call, or you can dial the number 1-900-468-7727, which costs 0ドル.40 per minute. Log in with the user name \fIuucp\fR and without a password. To subscribe, contact \fIuunet\fR at .LP .RS UUNET Communications Services .br 3110 Fairview Park Drive, Suite 570 .br Falls Church, VA 22042 .br Phone: 703-876-5050 .br Internet Mail: info@@uunet.uu.net .RE .Le .LP The real work in using \fIuucp\fR is in setting it up: once you have done that, it is intended to look like the UNIX \fIcp\fR command. For example, if you have a link to the server \fIunido\fR, the \fIuucp\fR name of \fIGermany.EU.Net\fR, you can transfer the contents of the .XX "germany.eu.net" file \fI/pub/gnu/gdb-4.11.tar.gz\fR to your local system with .Ps $ \f(CBuucp unido\e!/pub/gnu/gdb-4.11.tar.gz gdb-4.11.tar.gz .Pe Note the \fIuucp\fR host naming convention: the actual name (\fIunido\fR in this case) is just a label in the \fIuucp Systems\fR (or \fIL.sys\fR) file, and it's frequently different from the Internet name. The \f(CW!\fR is obligatory, and since most shells recognize it as a special character, you need to put a backslash in front of it. .LP \fIuucp\fR is a batch system: after you enter your command, you will just get a prompt back. At some time later--possibly much later--the transfer will be performed. Depending on your site configuration, it can take hours until the file is transferred--in some cases up to 24 hours. .LP I'm not going to go into more detail about \fIuucp\fR here. In \*[chcase] we look at porting Taylor \fIuucp\fR, which is a good idea even if you have \fIuucp\fR on your system: it has been a long time since the major versions of \fIuucp\fR have had more than cosmetic maintenance, and Taylor \fIuucp\fR offers a number of advantages, including ease of setup. .LP If \fIuucp\fR is already installed on your system, and it works, it shouldn't be any big deal to access any system that allows you to do so. For more gory details, read [Tondino & Dougherty 87] and [O'Reilly & Tondino 92]. .XX "Tondino, Grace" .XX "Dougherty, Dale" .XX "O'Reilly, Tim" .Bh ftp \fIftp\fR is the Internet File Transfer Program, and is the standard way to transfer large files long distances across the net. It works for small files and short distances too, but you may find thet \fIrcp\fR or \fINFS\fR are better .XX "NFS" alternatives in these areas. .LP One serious drawback in duplicating software across the net is that you need to have permission to access the remote system. Traditionally, you need a userid to access a system. Of course, the file server could have a specific user ID without a password, but that would throw the system open to attack from crackers\**. .XX "ftp, anonymous" .XX "anonymous ftp" .XX "cracker" .FS The term \fIcracker\fR is used to indicate people who try to crack computer system security. The daily press users the word \fIhacker\fR, much to the annoyance of dyed-in-the-wool UNIX hackers. See the Jargon file entries on \fIhacker\fR and \fIcracker\fR for much more information. .XX "hacker" .FE \fIftp\fR solves this problem by recognizing the special user name \fIanonymous\fR. .XX "anonymous" The user \fIanonymous\fR doesn't really exist, but \fIftp\fR can be set up to allow access to the system if the user name \fIanonymous\fR is specified. By convention, to help the system administrators with their bookkeeping, you should enter your real user ID in place of the password when logging in as \fIanonymous\fR. A typical session might look like: .Ps $ \f(CBftp ftp.tu-darmstadt.de\f(CW Connected to rs3.hrz.th-darmstadt.de. 220 rs3.hrz.th-darmstadt.de FTP server (Version 4.1) ready. Name (grog): \f(CBanonymous\f(CW 331 Guest login ok, send ident as password. Password: \fIusername does not echo\f(CW 230 Guest login ok, access restrictions apply. ftp> \f(CBcd /pub/gnu\f(CW 250 CWD command successful. ftp> \f(CBbin\fI to ensure binary transfer\f(CW 200 Type set to I. ftp> \f(CBget gdb-4.12.tar.gz\fI start the transfer\f(CW 200 PORT command successful. 150 Opening data connection for gdb-4.12.tar.gz (3682855 bytes). 3682855 bytes received in 1.1e+04 seconds (0.34 Kbytes/s) ftp> .Pe There are a couple of things to note about this transfer: .Ls B .Li The server may have multiple names, and the one you use may not be its main name. By convention, the first part of the name of an ftp server is \fIftp\fR, but that may not be the real name. Here we opened the server \s10\f(CWftp.tu-darmstadt.de\fR\s0, but the real name of the server is \s10\f(CWrs3.hrz.th-darmstadt.de\fR\s0. .Li .XX "ftp, binary transfer" .XX "ftp, ASCII transfer" Some versions of \fIftp\fR transmit in ASCII mode by default: they change every incidence of the ASCII line feed character (the C language constant \&\s10\f(CW\en\fR\s0) to the sequence \s10\f(CW\er\en\fR\s0 (they prepend an ASCII carriage return character). This permits you to print the results on normal printers, but makes a terrible mess of binary files. Transmitting in binary form always works, and places slightly less load on the system, since reformatting is not required. The message \f(CWType set to I.\fR is \fIftp\fR's way of telling you that it has set binary transmission mode. .\"> I'm glad you've got the following in comments; I don't think it's .\">> needed. By the way, I always thought that the problem with ASCII is .\">> that transfer might not be eight-bit clean. .\" ASCII mode: more is going on here than newline translation: if you're .\" accessing an IBM machine, it's ASCII-EBCDIC translation; if you're .\" accessing a Macintosh, some other weird translation going on. If .\" you're translating UNIX to UNIX, ASCII mode and binary are pretty much .\" equivalent; I've never noticed any \n -> \r\n conversions. I'm .\" sloppy and usually use ASCII mode--the default, as you say--until I .\" find out the file I got doesn't work! However, that has only happened .\" once or twice. .Le This transmission is fairly typical (though the transfer rates are appalling). In real life, you might find some of the other of \fIftp\fR's 60-odd commands of use. We'll look at the most useful commands in the following sections. .Ch "mget" Frequently you need to copy more than a single file. For example, if you currently have \fIgcc-2.5.0\fR and want to get \fIgcc-2.5.8\fR, you will discover the following files on the file server: .Ps ftp> \f(CBls\f(CW 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. -rw-rw-r-- 1 117 1001 43367 Nov 1 02:37 gcc-2.5.0-2.5.2.diff.gz -rw-rw-r-- 1 117 1001 1010 Nov 1 02:37 gcc-2.5.1-2.5.2.diff.gz -rw-rw-r-- 1 117 1001 78731 Nov 11 13:53 gcc-2.5.2-2.5.3.diff.gz -rw-rw-r-- 1 117 1001 13931 Nov 17 09:27 gcc-2.5.3-2.5.4.diff.gz -rw-rw-r-- 1 117 1001 76271 Nov 27 16:48 gcc-2.5.4-2.5.5.diff.gz -rw-rw-r-- 1 117 1001 8047 Dec 3 09:22 gcc-2.5.5-2.5.6.diff.gz -rw-rw-r-- 1 117 1001 5994481 Nov 27 16:49 gcc-2.5.5.tar.gz -rw-rw-r-- 1 117 1001 10753 Dec 12 19:15 gcc-2.5.6-2.5.7.diff.gz -rw-rw-r-- 1 117 1001 14726 Jan 24 09:02 gcc-2.5.7-2.5.8.diff.gz -rw-rw-r-- 1 117 1001 5955006 Dec 22 14:16 gcc-2.5.7.tar.gz -rw-rw-r-- 1 117 1001 5997896 Jan 24 09:03 gcc-2.5.8.tar.gz 226 Transfer complete. ftp> .Pe .Pn get-patches In other words, you have the choice of transferring 6 megabytes of software in \fIgcc-2.5.8.tar.gz\fR or 7 incremental patch files with a total of less than 250 kilobytes. We'll discuss patches and the use of \fIpatch\fR in \*[chcare], page \*[patch]. .XX "patch, program" On the other hand, copying the diffs requires typing all these long, complicated file names, so you might decide it's easier just to duplicate the whole 6 MB. .LP There is an easier way: \f(CWmget\fR (multiple get) duplicates files matching a wild card. You could perform the complete transfer with .Ps ftp> \f(CBmget gcc-2*diff.gz\f(CW mget gcc-2.5.0-2.5.2.diff.gz?\f(CBy\f(CW 200 PORT command successful. 150 Opening BINARY mode data connection for gcc-2.5.0-2.5.2.diff.gz (43667 bytes). 226 Transfer complete. 43667 bytes received in 19 seconds (2.298 Kbytes/s) mget gcc-2.5.1-2.5.2.diff.gz?\f(CBn \fIwe don't need this one\f(CW mget gcc-2.5.2-2.5.3.diff.gz?\f(CBy\f(CW 200 PORT command successful. 150 Opening BINARY mode data connection for gcc-2.5.2-2.5.3.diff.gz (78731 bytes). 226 Transfer complete. 78731 bytes received in 33 seconds (2.835 Kbytes/s) \fI\&... etc .Pe .Ch "prompt" Using \f(CWmget\fR saves a lot of network bandwidth and copies the files faster, but it has one disadvantage: \fIftp\fR prompts you for each file name, so you have to wait around to answer the prompts. If you don't, \fIftp\fR disconnects after 15 minutes of inactivity. It would be simpler to perform all the \f(CWget\fRs without any intervention. This is where the \f(CWprompt\fR command comes in. .LP The \f(CWprompt\fR command specifies whether certain prompts should be issued or not--the \f(CWmget\fR command is one example. This command is a toggle--in other words, if prompting is on, \f(CWprompt\fR turns it off, and if prompting is off, \f(CWprompt\fR turns it on. If prompting is off, the \f(CWmget\fR command above would have gone through with no interruptions. .LP In the previous example, you don't really want to transfer the file \fIgcc-2.5.1-2.5.2.diff.gz\fR, since it isn't needed to perform the patches: you can upgrade from 2.5.0 to 2.5.2 directly with the file \fIgcc-2.5.0-2.5.2.diff.gz\fR. On the other hand, not copying the file would mean sitting around for the duration of the transfer and answering the prompt for each file, and the file is only 1 kilobyte long. In this case, it is reasonable to copy it as well--in other cases, you may need to consider other alternatives. .Ch "reget" Sooner or later, you will lose a connection in the middle of a transfer. According to Murphy's law, this will usually happen with a file like \fIgcc-2.5.8.tar.gz\fR in the list above, and it will be shortly before the transfer is finished. If you are connected by SLIP and notice this in time, it may be sufficient to reestablish connection: \fIftp\fR is a remarkably resilient protocol, and you may find that it just continues as if nothing had happened. If this isn't successful, you may be able to save the day with \f(CWreget\fR, which picks up the transfer where it left off. The semantics are the same as for \f(CWget\fR. .LP Unfortunately, not all versions of \fIftp\fR have the \f(CWreget\fR command, and on many systems that do have the command, it doesn't work correctly. If you \fIdo\fR decide to use it, you should first make a copy of the partially copied file, in case something goes wrong. .Ch "user" .XX ".netrc" Normally, \fIftp\fR attempts to log in using the user name of the user who started the \fIftp\fR program. To make establishing connections easier, \fIftp\fR checks for a file called \fI.netrc\fR when perfoming a login sequence. \fI\&.netrc\fR contains information on how to log in to specific systems. A typical \fI.netrc\fR might look like: .Ps machine adagio login grog password foo machine allegro login grog password bar machine freebie login grog password baz machine liberty login grog password zot default login grog password barzot .Pe Lines starting with the keyword \fImachine\fR specify login name (\fIgrog\fR in this example) and password for each system. The last line is the important one: if the system is not mentioned by name, \fIftp\fR attempts a login with user name \fIgrog\fR and password \fIbarzot\fR. Though this may be of use in the local net, it is unlikely that it will work on an \fIftp\fR server. The result of such an attempt would look something like .Ps $ \f(CBftp ftp.tu-darmstadt.de\f(CW Connected to ftp.tu-darmstadt.de. 220 rs3.hrz.th-darmstadt.de FTP server (Version 4.1) ready. 331 Password required for grog. 530 Login incorrect. Login failed. Remote system type is UNIX. Using binary mode to transfer files. ftp> .Pe This error message is not very obvious: although you're not logged in, you still get the same prompt, and \fIftp\fR produces enough verbiage that it's easy to oversee that the login attempt failed. In order to complete the login, you need to use the \fIuser\fR .XX "ftp, user command" command: .Ps ftp> \f(CBuser anonymous\f(CW 331 Guest login ok, send ident as password. Password: \fIusername does not echo\f(CW 230 Guest login ok, access restrictions apply. .Pe This behaviour is not necessarily a reason to change your \fI.netrc\fR file: the default entry may be very useful in a large net with relatively lax security, and it's easy enough to recover from the "error" when logging in to the file server. On the other hand, you should be aware that the \fI.netrc\fR file itself is a security risk: it contains all your passwords in readable form. If you use a \fI\&.netrc\fR file, make sure it is secured so that only you can read or write it. .Ch "idle" .XX "ftp, closing connection" As it is normally run, \fIftp\fR closes a connection if nothing happens for 15 minutes (900 seconds). The \s10\f(CWidle\fR\s0 command can modify this time, up to a limit of 2 hours, which can occasionally be of use on a local net. \f(BIDon't use this option with an Internet file server!\fR--it ties up valuable and scarce resources that other people might be able to use. .Bh "Mail servers" If you can access the Internet only via \fIuucp\fR or a mail gateway, one alternative is the \fImail server\fR .XX "mail servers" concept: you send a mail message to the server, and it collects the files you ask for, packs them up in one or more mail messages, and sends them back. Compared to \fIftp\fR, mail servers have a number of disadvantages: .Ls B .Li Mail is normally a text-only service, whereas most archive files are binary. As a result, the files usually need to be converted into an appropriate text format before being sent, and after reception they need to be converted back to the original format. .Li Most mail systems have a limit on the maximum message size--64 kilobytes is a popular size. It's not uncommon for an archive to be 5 MB long, which after text conversion might become 6.5 MB--about 100 mail messages that need to be patched back together and converted. .Li It takes longer. Some people report having to wait weeks for a reply from particularly overloaded systems. .Li It places a significant load on the mail server. .Le The only advantage of mail servers is that they can work where \fIftp\fR doesn't work: if you're not directly connected to the Internet, this may be your only option. As with \fIarchie\fR servers, there are a number of mail servers to choose from, but in this case their capabilities vary significantly. Some servers can send only local files--these can be thought of as an alternative to \fIuucp\fR. Other servers supply a general purpose interface to \fIftp\fR. These are generally called \fIftp\fR servers. Here's an overview of some current servers: .XX "mail servers, site list" .Ts "Some ftp servers" .TS H center, linesize(2), tab(#) ; lfCWp9 | l . Server name#Country _ .TH N ftpmail@@cs.uow.edu.au#Australia ftpmail@@decwrl.dec.com#USA ftpmail@@ftp.uni-stuttgart.de#Germany ftpmail@@ftp.uu.net#USA ftpmail@@grasp.insa-lyon.fr#France ftpmail@@ieunet.ie#Ireland ftpmail@@lth.se#Sweden ftpmail@@src.doc.ic.ac.uk#Great Britain ftpmail@@sunsite.unc.edu#USA .TE .Te Another point you should consider is the load that these servers place on the system. To quote the anonymous FTP FAQ: .Ps Please make sure your system admin has approved the the use of a mail server, as files can take system resources of not only your site, but several sites up the stream. And please abide by the guidelines that the ftpmail server administrators have put in their help files. Most ftpmail servers default to their own site for files, so try retrieving things from that site first. In general, most files you need are already available there, so it is a waste to connect to another machine. .Pe .LP In general, \fIftp\fR servers offer a subset of the commands of \fIftp\fR. For example, .Ps open cd dir \fITo obtain a directory listing\f(CW get \fITo retrieve a file\f(CW help \fI\&To get a command list\f(CW quit .Pe Most mail servers offer a choice of encoding schemes--\fIuuencode\fR and \fIatob\fR are the favourites. .Ah Summary In this chapter, we examined the question of getting software. We saw: .Ls B .Li There is no sure-fire way to find the software you are looking for, but most software can be found with \fIarchie\fR. .Li If you can't find software with \fIarchie\fR, the newsgroup \s10\f(CWcomp.sources.wanted\fR\s0 may be able to help. .Li Just because you found the software on the Internet doesn't mean that you have to get it via the Internet. CD-ROM and tapes have significant advantages. .Li If you do get software via the Internet, you have the choice of \fIuucp\fR, \fIftp\fR or ftp servers, which send files as mail messages. .Le @

AltStyle によって変換されたページ (->オリジナル) /