[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5

uucp Command


Copies files from one system to another.


uucp -c -C ] [  -d -f ] [  -gGrade ] [  -j ] [  -m ] [  -nUser] [  -r ] [  -sFile ] [  -xDebugLevel ] SourceFile ... DestinationFile ...


The uucp command is a Basic Networking Utilities (BNU) command that copies one or more source files from one system to one or more destination files on another UNIX system. Files can be copied within a local system, between a local and a remote system, and between two remote systems.

The uucp command accomplishes the file transfer in two steps: first, by creating a command (C.*) file in the spooling directory on the local computer and then by calling the uucico daemon to send the request to the specified computer. Command files include information such as the full path name of the source and destination files and the sender's login name. The full path name of a command file is a form of the following:


where N is the grade of the request and xxxx is the hexadecimal sequence number used by BNU.

If the uucp command is used with the -C flag to copy the files to the spool directory for transfer, the uucp command creates not only a command file, but also a data (D.*) file that contains the actual source file. The full path name of a data file is a form of the following:


Once the command files (and data files, if necessary) are created, the uucp command then calls the uucico daemon, which in turn attempts to contact the remote computer to deliver the files.

It is useful to issue the uuname command to determine the exact name of the remote system before issuing the uucp command. The uulog command provides information about uucp activities with another system.

Source and Destination File Names

File names and system names can contain only ASCII characters. Each can either be a path name on the local system or have the following form:


where SystemName is taken from a list of system names that BNU knows about.

The destination SystemName can also be a list of names, such as the following:

SystemName!SystemName. . . SystemName!PathName

In this case, an attempt is made to send the file using the specified route to the destination. Make sure that intermediate nodes in this route are willing to forward information, and that they actually talk to the next system.

The shell pattern-matching characters ? (question mark), * (asterisk), and [ . . . ] (brackets and ellipsis) can be used in the path names of the source file; the appropriate system expands them. The shell pattern-matching characters should not be used in the path name of the destination file.

If the DestinationFile is a directory rather than a file, the uucp command uses the last part of the SourceFile name to name the transferred file on the remote system.

Path Names

Path names for the SourceFile and DestinationFile parameters contain only ASCII characters. Paths for the source file can be one of the following:

Paths for the DestinationFile parameter can be in the forms for the SourceFile parameter, or can be one of the following:



-c Prevents files from being copied. This flag is the default and should not be used with the -C flag. If both flags are specified, the -c flag is overridden.
-C Copies local files to the spool directory for transfer. Depending on the configuration of the Poll and Systems files and on how often the uusched daemon is run, the files may be transferred immediately on demand polling or in the future.

Occasionally, problems occur while transferring a source file; for example, the remote computer may not be working or the login attempt may fail. In such a case, the file remains in the spool directory until it is either transferred successfully or removed by a cleanup command.

This flag counteracts the -c flag.

-d Creates any intermediate directories needed to copy the source files to the destination files on a remote system. Instead of first creating a directory and then copying files to it, the uucp command can be entered with the destination path name, and the BNU Program will create the required directory. This flag is the default and cannot be used with the -f flag.
-f Does not create intermediate directories during the file transfer. This flag is used if the destination directory already exists and you do not want BNU to write over it. This command counteracts the -d flag.
-gGrade Specifies when the files are to be transmitted during a particular connection. The Grade variable is a single number (0 to 9) or letter (A to Z, a to z); lower ASCII-sequence characters cause the files to be transmitted earlier than do higher sequence characters. The number 0 is the highest (earliest) grade; z is the lowest (latest) grade. The default is N.
-j Displays the job identification number of the transfer operation on standard output. This job ID can be used with the uustat or uuq command to obtain the status of a particular job or with the uustat -k command or uuq -d command to terminate the transfer before it is completed.
-m Sends a mail message to the requester when the source file is successfully copied to the destination file on a remote system. The message is sent to the requester's mailbox, /var/spool/mail/User. The mail command does not send a message for a local transfer.

The -m flag works only when sending files or receiving a single file. It does not work when forwarding files.

-nUser Notifies the recipient on the remote system identified by the User entry that a file has been sent. The mail system does not send a message for a local transfer. User names can contain only ASCII characters. Receiving multiple files specified by the shell pattern-matching characters ? (question mark), * (asterisk), and [ . . . ] (brackets and ellipses) does not activate the -n option.
-r Prevents the starting of the uucico file transfer daemon, even if the command was issued at a time when calls to the remote system are permitted. (By default, a call to the remote system is attempted if the command is issued during a time period specified in the Poll and Systems files.) The -r option is useful for debugging.
-sFile Reports the status of the transfer to the specified file. In this case, the File variable must designate a full path name.
-xDebugLevel Displays debugging information on the screen of the local system. The DebugLevel variable is a number from 0 to 9. The higher the number, the more detailed the report.


  1. To copy a file from the local system to a remote system, enter:

    uucp /home/geo/f1 hera!/home/geo/f1

    In this example, the f1 file from the local system is copied to remote system hera.

  2. To copy a file from the remote system and place it in the public directory, enter:

    uucp hera!geo/f2 /var/spool/uucppublic/f2

    In this example, the f2 file from remote system hera is copied and placed in the public directory.

  3. To copy a file from the remote system and place it in a directory other than the public directory, enter:

    uucp hera!geo/f2 /home/geo/f2

    In this example, the f2 file from the remote system hera is copied to the /home/geo/f2 directory. The geo login directory must allow write permission to members of the other group, for example, with mode 777.


/usr/bin/uucp Contains the uucp command.
/etc/uucp/Poll File listing times when remote systems are automatically called (polled).
/etc/uucp/Systems File describing accessible remote systems.
/etc/uucp/Sysfiles Specifies alternate files to be used as Systems files.
/var/spool/uucp Spooling directory containing BNU status information.
/var/spool/uucppublic Public directory containing files awaiting transfer by the uucico daemon.
/var/spool/uucppublic/SystemName/C.* Contains command files.
/var/spool/uucppublic/SystemName/D.* Contains data files.

Related Information

The ct command, cu command, mail command, uuclean command, uucleanup command, uulog command, uuname command, uupick command, uuq command, uustat command, uuto command, uux command.

The uucico daemon, uusched daemon.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]