In addition, this chapter gives examples that show how people are using UNIX to meet their communications needs. It also tells where in the book you can find discussions of the various UNIX communications programs.
Communications programs (such as electronic mail) are among the most often used UNIX programs and are usually among the first programs a new user learns. Although UNIX is extensively documented, some of the most useful information about UNIX communications programs exists only in the minds of UNIX wizards and in highly technical manuals. This book aims to open up the world of UNIX communications to the general user.
With the explosion in growth of the Internet, UNIX communications has become even more important. Even though some computers on the Internet aren't running UNIX and some UNIX systems aren't connected to the Internet, the UNIX communications programs have formed the basis of communications over the Internet. And although efforts are being made to write easy-to-use "front ends" for communications programs, the basic UNIX communications programs are still in use daily on the Internet.
Computer communications--the ability to transfer data from one user to another--became the watchword of the computer industry during the 1980s, and it should be even more important in the 1990s. We hear of local-area networks (LANs), AppleTalk, Ethernet, and micro-to-mainframe links, but UNIX is an old pro at networking. UNIX-based computer networks have been around for more than 20 years! From the very beginning communication between users was an essential part of the UNIX operating system. UNIX began as a joint effort of programmers at Bell Laboratories to create an operating system that would facilitate their work together. Because it was designed by programmers and not really marketed as a commercial product until fairly recently, UNIX has been able to remain an "open" system, with roadblocks to information exchange kept to a minimum.
As we discuss the different scenarios, we introduce some common concepts of computer communications, such as "dumb terminal" and "uploading a file." If you want more details about any of these matters, consult a primer that addresses the issues of data communications and networks.
If this were a computer installation at a university (UNIX is used by approximately 90 percent of U.S. computer science departments), user #1 could send the following message to another student in his computer language class:
Help! I have to write a paper on the C++ programming language by next week. Do you know of some good books on it?
User #2 would see the message when she checked her mail and would send this message in return:
Relax. I've got an annotated C++ bibliography on one of my disks here. As soon as I find it, I'll upload it to the system and mail it to you.User #2 would then locate the file with the C++ bibliography and include it in a mail message to user #1.
In Figure 1.1, the UNIX setup on the left is a "dumb" terminal, consisting of only a keyboard and a monitor. A dumb terminal has no intelligence (computing power) of its own: It only enables you to type information into the main computer, and it only displays information presented by that computer.
Figure 1.1 People on the same computer communicate with each other.
The setup on the right is an "intelligent" terminal. An intelligent terminal (one with its own computing power such as a desktop PC) offers big advantages over a dumb terminal. If the main computer is heavily loaded with users, you can download your files (transfer them from the main computer to your personal computer and continue to work on them using the computing power of your PC. With the PC, you can compose letters and documents locally with one of the word processors available for PCs (word processors that enable you to work graphically, instead of being the text based versions you may have to use if you are working remotely). Later, you can upload the text files (transfer them to the remote main computer. After the files are stored on the main computer, you can send them to other users with one of the UNIX mail programs.
As computer systems have become more powerful and less expensive, it's possible that the computer system on your desktop is almost as powerful as the computer you are connecting to! Affordable workstations running UNIX are available to many people, so that you can perform almost all of your communications tasks on your desktop system and only connect to the main system when you need to transmit information.
In Figure 1.1 both setups are directly connected with a wire or cable to the UNIX computer. This hard-wired connection, as it is also called, is simple and provides high-speed response. When a user presses a key, the computer seems to respond instantaneously, although actually the data is being sent at a rate of perhaps 19,200 baud (bits per second). The problem with directly connected terminals is that they generally must be located in the same vicinity as the computer, unless special hardware is used to allow them to be placed further away.
Figure 1.2 With a modem you can access a computer from a distance.
For example, suppose that a traveling sales representative has set up a portable computer in a hotel room in Boston and is using a modem to call the company's UNIX computer in Los Angeles. Using the telephone network, the sales representative can check her electronic mailbox to see if anyone has sent her messages. If so, she can fire off replies in a fraction of the time it would take with paper mail. It's a simple matter for her to upload a report to the main computer or to download a file with the latest competitive information into her PC.
Figure 1.3 A central UNIX computer connects remote users calling on
modems.
On a conferencing system, such as the Whole Earth `Lectronic Link (The WELL) in Sausalito, California, users can send messages to one another with the UNIX mail programs, or they can participate in ongoing electronic conferences on such topics as "One-Person Businesses," "Spirituality," "Politics," and "UNIX." They can also read news articles from around the world by using the Netnews software. This system serves as an intellectual forum for the discussion of new ideas and as a meeting place for people of similar interests.
Other Internet providers enable you to connect to your home UNIX system by calling a local telephone number and using such UNIX programs as telnet and ftp. Because many of these providers have local access numbers in cities across the country, you can use local numbers to connect to your home computer when you are traveling.
Figure 1.4 shows a setup for transferring files between computers by using UUCP programs. (UUCP programs are explained shortly.) When UNIX computers call one another, they often transfer megabytes of data and may tie up a phone line for hours. High-speed modems cut that time dramatically. For example, to send the text of the novel Moby Dick at 300 baud would take 23 hours. At 1,200 baud, it would still take about 6 hours. With the new 9,600-baud modems, it would take only 43 minutes! Of course, it does no good to have a 9,600-baud modem if the host system has only 1,200- or 2,400-baud dial-up lines--the connection can only be as fast as the slower of the two modems. Fortunately, most service providers now offer high-speed modems, although frequently at a premium charge.
If you know the speed of your modem, you can get a rough idea of how long it will take to transfer information. If, for example, you have a fast 14,400-baud modem, you can transfer about 1,440 bytes of information per second. To transfer a megabyte of information, then, would take about 700 seconds, or around 11 minutes. Many modern modems offer features such as automatic data compression, which makes their effective baud rate even higher than their advertised rate.
Figure 1.4 UUCP programs transfer files between UNIX computers
The programs that permit two UNIX machines to pass files to each other are known as the UUCP group of programs (UUCP stands for UNIX to UNIX copy. Part IV of this book is devoted to these programs. UUCP operations underlie the operation of many other UNIX communications programs.
You can also use the UUCP programs directly. For example, in Figure 1.4, the system administrators for two different UNIX systems could use the UUCP programs to transfer many megabytes of programs and data files from one system to another.
Such a network does in fact exist--it is the UUCP network. Unbelievable as it may seem, this complex network functions on a cooperative basis, relying on volunteer administrators and on the goodwill of the institutions, companies, and research labs who own the computers.
Figure 1.5 A network of UNIX computers links thousands of users.
The UUCP network does more than just move mail. A group of programs called Netnews runs continuously as USENET on the UUCP network. Hundreds of special "conferences" (called newsgroups) are organized on USENET, and users share ideas on this giant electronic bulletin board. (You will learn how to use USENET in Part III of this book.)
For example, when the infamous Internet "worm" program nearly brought some major UNIX networks to a halt in November 1988, UNIX experts used electronic mail to keep in touch as they struggled to understand and disarm the intruding program. In ensuing weeks, both technical and ethical discussions in USENET newsgroups explored ways to make UNIX systems more secure and discussed the sanctions that could be used against intruders. A little later, in 1989, the democracy movement in China used USENET, as well as fax transmissions, to tell the world about their struggle and to ask for messages of protest and support from the world community. Finally, during that same busy year, information and debate about "cold fusion" spread across the networks. It is increasingly evident that USENET and other networks are likely to supplement--if not supplant--the traditionally methodical process of publication in scientific journals.
More recently, the USENET system was critical in keeping communications going during the Los Angeles earthquake. Even though many regular telephone lines were jammed, the dedicated lines that carry network traffic were able to convey reports of the problems (and enabled people to find out whether friends and relatives were alive). In fact, in providing emergency communications, USENET and the other computer communications systems are beginning to take the place of the amateur radio network.
In addition to the UUCP network of UNIX computers, the world-wide network called the Internet also connects many thousands of UNIX systems together. Using the Internet allows UNIX systems to communicate at speeds much faster than that allowed by modems. The Internet will be described in more detail in Chapter 2, "Introduction to the Internet."
Commands using control characters are shown as Control+D, Control+N, and so on. In some UNIX programs, the prompts and help screens represent such commands as ^D and ^N, using the ^ symbol as a shorthand way of representing the Control key. This is the same as Control+D and Control+N in our notation. In either case, you press the Control key and the letter simultaneously. You don't have to press Shift to capitalize the letter.
For text representing computer input and output and the names of files, directories, and variables, we use a typeface that resembles the monospace characters you see on the screen. It looks like this:
Welcome to UNIX Communications Please enter your first command.
cp filename directory_nameshows the format for using the copy command (cp) to copy a file into a different directory. The words filename and directory_name are placeholders for the names of the real file and directory. To use this command, you would have to enter the actual names of the file and the directory.
You'll be able to overcome minor inconsistencies by experimenting and looking in a UNIX primer. You can also use the man command followed by a program name to read the online manual entry for that program. For more difficult problems ("How do I send a message to my cousin who's on a UNIX system at UCLA?"), you might have to turn to an experienced user or to your system administrator.
% uucp alice.txt tortoise\!/uucp/alice.txtNote that we always show the escape character (the backslash) when applicable. The Bourne Shell ignores the escape character if it is not needed. Most of the examples will also work in shells such as the Korn shell (ksh).
Many of the examples in this book are taken from our home system, a 4.3BSD (Berkeley)-derived system. However, we've been careful to make examples and explanation accurate for System V as well.