-->
Previous Table of Contents Next


A UUCP Primer

At its core, the UUCP commands allow machines to communicate directly via network links or telephone connections. They are limited in scope and are geared toward the rudimentary purposes of sending along files, electronic mail, and (sometimes) Usenet news.

In this chapter, we’ll focus on the few commands you’re likely to use. (If you want information about all of the UUCP commands, check Appendix A for a list of further reading material.) We’ll also avoid configuration issues, which are best left to a system administrator.

Before you use uucp, you need to know what machines are connected to yours. The uuname command does just this:


     gilbert:/$ uuname

     geisha

     spike

Why is this information important? Because you’ll need to specify machine names with the uucp command.

Using UUCP

The uucp command is used to copy files from one machine to another. At first glance, in this age of Internet and the Information Superhighway, you may think that this is incredibly retro technology. And, conceptually, it is.

Realistically, however, the uucp command has its widest application in the corporate world, where interconnected computers are very common. In these situations, the corporate systems may not be tied to the outside world but only connected to other corporate systems. In these cases, the uucp command is a handy way of transferring a file from your system to the corporate headquarters in Sioux City, Iowa.

The best way to understand the uucp command isn’t to think of it as a strange and unfamiliar networking command—just think of it as an extended version of the common cp command, which you used earlier in this book. Instead of downloading and uploading files from a local directory, you’re using uucp to download and upload files from another machine.

There’s an added advantage to the uucp command: All in all, it’s a rather secure method of transferring files, when everything is set up correctly. (There’s the issue of security popping up again.) The uucp command and the UUCP utilities can enact very specific guidelines on where files can be uploaded to or downloaded from.

Let’s look at a typical uucp command line:


     $ uucp chap9.txt spike!/usr/spool/uucppublic/chap9.txt

While this may seem to be a long command line, a closer look will show that it’s actually rather simple.

The uucp portion of the command line, obviously, refers to the uucp command. This is followed by the name of the file to be copied (chap9.txt).

The next portion is potentially the most confusing portion for novice users, as it represents the destination of the file by name of the machine and the directory. In this case, spike refers to the name of the machine; the uucp command knows this because the name of the machine ends with an exclamation mark (!).

If the exclamation mark looks familiar, it should; remember, the Usenet method of electronic-mail addressing with bang paths makes heavy use of exclamation marks.

The exclamation mark is immediately followed by the destination directory. The usr/spool/uucppublic directory is a common destination for UUCP sites.

Please be aware that none of the machine names in this chapter are real. Don’t use these specific examples on your own system.

Generically, the uucp command would look like this:


     gilbert:/$ uucp sourcefile destinationfile

The uucp command can also be used to grab files from another machine, as long as you have the proper permissions (again, a configuration issue that we’ll duck). In this case, you’ll alter the uucp command line used earlier in this chapter. The principle is the same: use the uucp command to list the source file and then its destination. In this case, the remote file is the source file and a local directory is the destination:


  gilbert:/$ uucp spike!/usr/spool/uucppublic/chap9.txt\

  /usr/spool/uucppublic

When using the uucp command to download a file, all you need to do is specify the destination directory; the command assumes that the filename will remain the same and that the destination directory exists on your local machine.

Potential Problems with the Uucp Command

As many frustrated users can attest to, the uucp command and the greater UUCP command set are not foolproof. Perhaps the greatest frustration is that the uucp command isn’t interactive, and there’s no way to monitor the status of a file transfer. You can tell uucp to send you a receipt via electronic mail when the file transfer is completed:


  gilbert:/$ uucp -m chap9.txt spike!/usr/spool/uucppublic/chap9.txt

However, if you don’t receive the electronic mail confirmation, you can assume that the transfer has failed. Finding out why, however, isn’t an easy task.

It is made somewhat easier, however, by the presence of a logfile that uucp maintains as part of the transfer process. To get at this file, use the uulog command:


     $ uulog

This will provide a lot of output—probably too much for your troubleshooting purposes. It’s probably better if you combine the uulog with the name of a machine:


     $ uulog -sspike

Yes, -sspike is correct. In an oddity, the -s option to uulog must be immediately followed by the name of the machine (in this case, spike).

You’ll then need to read through the arcane information from uulog and try to make some sense of it. Successful file transfers will end with REMOTE REQUESTED or OK.

What Can Go Wrong?

When a uucp connection fails, there are can be many potential culprits. The uulog command can be handy to discover that a connection was denied by the remote system (something like ACCESS DENIED will appear in the logfile). In this case, the login name or the password required by the remote machine may have been changed; this is a task for the system administrator to tackle.

If this isn’t the case and ACCESS DENIED still appears in the logfile, it could be a simple case of a mistyped command line. If you type the wrong filename or directory, the connection will succeed, but the transfer will fail. Again, by a careful read of the logfile, you can determine this.

Your transfer may also be the victim of your own impatience. Not all uucp requests are instantaneous; many system administrators choose to queue requests and make the transfers after hour, when longdistance rates are cheaper.


Previous Table of Contents Next