1.  Uucp - UNIX to UNIX File Copy

The uucp command is the user's primary interface with the system. The uucp command was designed to look like cp to the user. The syntax is

where the source and destination may contain the prefix system-name! which indicates the system on which the file or files reside or where they will be copied.

The options interpreted by uucp are:

-d
Make directories when necessary for copying the file.
-c
Don't copy source files to the spool directory, but use the specified source when the actual transfer takes place.
-gletter
Put letter in as the grade in the name of the work file. (This can be used to change the order of work for a particular machine.)
-m
Send mail on completion of the work.

The following options are used primarily for debugging:

-r
Queue the job but do not start uucico program.
-sdir
Use directory dir for the spool directory.
-xnum
Num is the level of debugging output desired.

The destination may be a directory name, in which case the file name is taken from the last part of the source's name. The source name may contain special shell characters such as ``?*[]''. If a source argument has a system-name! prefix for a remote system, the file name expansion will be done on the remote system.

The command

uucp *.c usg!/usr/dan

will set up the transfer of all files whose names end with ``.c'' to the ``/usr/dan'' directory on the``usg'' machine.

The source and/or destination names may also contain a ~user prefix. This translates to the login directory on the specified system. For names with partial path-names, the current directory is prepended to the file name. File names with ../ are not permitted.

The command

uucp usg!~dan/*.h ~dan

will set up the transfer of files whose names end with ``.h'' in dan's login directory on system ``usg'' to dan's local login directory.

For each source file, the program will check the source and destination file-names and the system-part of each to classify the work into one of five types:

[1]
Copy source to destination on local system.
[2]
Receive files from other systems.
[3]
Send files to a remote systems.
[4]
Send files from remote systems to another remote system.
[5]
Receive files from remote systems when the source contains special shell characters as mentioned above.

After the work has been set up in the spool directory, the uucico program is started to try to contact the other machine to execute the work (unless the -r option was specified).

Type 1

A cp command is used to do the work. The -d and the -m options are not honored in this case.

Type 2

A one line work file is created for each file requested and put in the spool directory with the following fields, each separated by a blank. (All work files and execute files use a blank as the field separator.)

[1]
R
[2]
The full path-name of the source or a ~user/path-name. The ~user part will be expanded on the remote system.
[3]
The full path-name of the destination file. If the ~user notation is used, it will be immediately expanded to be the login directory for the user.
[4]
The user's login name.
[5]
A ``-'' followed by an option list. (Only the -m and -d options will appear in this list.)

Type 3

For each source file, a work file is created and the source file is copied into a data file in the spool directory. (A ``-c'' option on the uucp command will prevent the data file from being made.) In this case, the file will be transmitted from the indicated source.) The fields of each entry are given below.

[1]
S
[2]
The full-path name of the source file.
[3]
The full-path name of the destination or ~user/file-name.
[4]
The user's login name.
[5]
A ``-'' followed by an option list.
[6]
The name of the data file in the spool directory.
[7]
The file mode bits of the source file in octal print format (e.g. 0666).

Type 4 and Type 5

Uucp generates a uucp command and sends it to the remote machine; the remote uucico executes the uucp command.