This chapter describes the UNIX-to-UNIX Copy Program (UUCP). Using UUCP enables you to:
For an overview of UUCP system management and tasks, see the Network and Communications Overview.
With UUCP, you can connect over a hardwired asynchronous line, a network, or a telephone line (using modems at both ends) to:
UUCP pathnames follow the same conventions as the operating system with the following exceptions:
/usr/spool/uucppublic
directory is set up for transferring data among
other hosts. The brief form of this directory is
~uucp
.
!
)
after the host name. For example,
sea!/research/new
specifies the file
new
in the directory
/research
on host
sea
.
!
)
after each host name. For example,
gem!car!sea!/research/cells
specifies the file
cells
in directory
/research
on host
sea
,
which is reachable through host
car
;
car
is reachable through host
gem
.
In the C shell, the exclamation point
(!
)
will be mistranslated unless you precede it with a backslash
(\
),
for example:
gem\!car\!sea\!/research/cells
To communicate with a remote host by using UUCP commands from your local
host, you must determine which other hosts support the UUCP protocol.
The UUCP
uuname
utility displays a list of all hosts with which you can communicate
using UUCP from your local host.
The following example shows the
uuname
command with output.
%
uuname
elvis fab4
This example shows that two remote hosts are accessible to the
local host through UUCP. To identify the local host,
use the
-l
option to the
uuname
command. For example:
%
uuname -l
music
By using UUCP commands among compatible hosts, a user on host
music
can send to or receive files from hosts
elvis
or
fab4
.
For more information, refer to the
uuname
(1)
reference page.
Before you can use UUCP commands, you must connect your local host to the remote host. There are three commands you can use to connect to a remote host:
cu
and
tip
commands establish a full-duplex connection, giving the appearance of being
directly logged in to the remote host. This connection enables the
simultaneous transfer of data between the hosts.
ct
command establishes a remote connection by letting you dial an attached
terminal and log in via a modem and telephone line.
Note
A remote connection is subject to the security features on the local and remote host. See your system administrator for more information.
The
cu
command and its options enable you to connect to a remote host,
log in to it, and perform tasks there from your
local host. You can perform tasks on each host by switching back
and forth between the two.
If both hosts use the operating system,
you can enter commands on the remote host from your local host.
The following steps show how to use the
cu
command to connect from local host
earth
to remote host
moon
,
log in to
moon
,
and enter a command there:
cu
command at the local system prompt; a message verifies the connection:
earth%
cu moon
Connected
The login prompt for the remote host will be displayed. When connecting to some remote hosts, you may need to press the Return key several times before a login prompt is displayed.
moon
at the login prompt. The system prompt for host
moon
is displayed.
moon
supports. For example, to list the contents of the
/usr/geog/crater/earthside
directory, enter the following command at the
system prompt:
moon%
ls /usr/geog/crater/earthside
copernicus.dat tycho.dat
moon%
Note
The preceding example may not work for all
cu
connections. It is used here as a brief, general example. See your system administrator for more information.
After logging in to the remote host, you can
switch back and forth between it and the local host
because they run concurrently. To return to your local host and
enter a command there, type a tilde and an exclamation point
(~!
)
followed directly by the command, or wait for the local host prompt to
display and then enter the command. To return to the remote host, press
Ctrl/d.
To connect to a directly-connected remote host, use the
cu
command with the
-l
option to name the hardwired line that
connects the two computers. Most of these
communication lines have names that are variations of the
standard device name,
tty
.
To use the
cu
command with the
-l
option to connect to a remote host with an unknown name, but which
uses hardwired device
ttyd0
,
enter the following command:
earth%
cu -lttyd0
Connected
After the connection is made, you can log in to and execute
commands on remote host
moon
.
Refer to the steps in
Section 14.3.1.1.
To return to the local host, type a tilde and an exclamation point
(~!
)
followed directly by the command or wait for the local system prompt to
display before entering the command. To return to the remote
host, press Ctrl/d.
Note
If you use the
-l
option, but still enter the name of a remote host, no error message will be generated. Instead,cu
will try to connect to the first available line for the requested host name, ignoring the specified line. If it makes the connection, it may not be the one you intend.
You can use
cu
to connect by telephone to a remote host
whenever the remote host has not been set up to communicate with the local
host through UUCP. To do so, the following conditions must be met:
The following example shows how to use the
cu
command to connect to a remote host that has a long-distance
telephone number of 1-612-555-6789. The
-s
option specifies a transmission rate of 300 baud. Assuming that dialing 9
is necessary for an outside dial tone, enter the following
cu
command at the local system prompt:
earth%
cu -s300 9=16125556789
Connected
After the connection is made, you can log in to and execute commands on the remote host. (Refer to the steps in Section 14.3.1.1).
To return to the local host, type a tilde and an exclamation point
(~!
)
followed directly by the command or wait for the local system prompt to
display before entering the command. To return to the remote
host, press Ctrl/d.
If you do not use the
-s
option to specify a transmission speed,
an appropriate rate is selected by default from data in
/usr/lib/uucp/Devices
.
For added security use the
-n
option, which prompts you for the telephone number. This suppresses
the display of the phone number with the
ps
command, which would otherwise display the number with the
cu
command that you enter.
Table 14-1
summarizes the
cu
command options and entries. See the
cu
(1)
reference page for more information.
Option | Description |
-sspeed
|
Specifies the rate at which data is transmitted to the remote host. The
default rate, set during UUCP installation and based on data in
/usr/lib/uucp/Devices ,
should be sufficient for most of your work.
Most modems operate at 300, 1200, or 2400 baud, while most hardwired lines are set to 9600 baud or higher. When transferring a large file, you may want to specify the low 300-baud rate for less interference on the line. |
-e | -o
|
Specify
-e
for even or
-o
for odd parity for data sent to the remote host.
|
-h
|
Specify
-h
to emulate local echoing, to support calls
to other hosts that expect terminals to be set to half-duplex mode.
|
-d
|
Specify
-d
to print diagnostic traces.
|
-n
|
Specify
-n
to have
cu
prompt for a telephone number (for added security)
|
-lline
|
Specifies the name of a device (line) for the communication
between two computers.
The default is either a hardwired asynchronous line, or a
telephone line with an automatic dialer such as a modem. If your
site has several communication lines, you may want to specify a
particular line for your
cu
link.
Usually, you do not have to specify a line or device; the default
established during UUCP installation should be sufficient.
If you want to connect to a remote
computer but do not know its name, you can enter the
|
-t
|
Dials a terminal that has been set to "auto-answer", and maps
carriage return
to
carriage return/linefeed .
|
host_name
|
Specifies the name of the remote host with which you want to establish a connection. |
telno
|
Specifies the telephone number in a remote connection using a modem. |
While connected by
cu
to a remote host, you can use local
cu
commands to perform the following tasks:
To return temporarily to the local host to work, type a
tilde and an exclamation point
(~!
)
at the remote system prompt; wait for the local system prompt to be
displayed in the following form, where
local
is the name of the local host:
~
[
local
]
!
Instead of waiting for the local system prompt to display, you can
enter the command immediately after typing the
~!
that accesses the local host. For example, while connected by
cu
to remote host
moon
,
you can enter the following command to return to local host
earth
and use the
cat
command to read the
/usr/crew/r2/asimov/AI
file:
moon%
~!cat /usr/crew/r2/asimov/AI
There are three
cu
local commands for tasks that are performed very often.
You enter these commands from the remote host to perform tasks on the
local host while you continue working on the remote host.
These commands are preceded by a tilde and a percent symbol:
~%cd
|
changes the directory on the local host |
~%take
|
copies a file from the remote host to the local host |
~%put
|
copies a file from the local host to the remote host |
For example, while connected by
cu
to remote host
moon
,
you can change the current directory on local host
earth
from
/usr/geog/ocean
to
/usr/geog/ocean/pacific
by entering the following command:
moon%
~%cd pacific
While connected by
cu
to remote host
moon
,
you can copy the file,
/usr/ETI/clavius
to the file
/usr/NASA/decode
on local host
earth
by entering the
~%take
local command at the remote system prompt:
moon%
~%take /usr/ETI/clavius /usr/NASA/decode
While connected by
cu
to remote host
moon
,
you can copy the local file
/usr/NASA/jupiter
to the file,
/usr/ETI/clavius/hal9
on the remote host by entering the
~%put
local command at the remote system prompt:
moon%
~%put /usr/NASA/jupiter /usr/ETI/clavius/hal9
Note
Before using the
~%take
and~%put
commands, verify that the destination directory exists. Unlike theuucp
command, thesecu
local commands do not create intermediate directories during file transfers.
You can transfer only ASCII files with
~%take
and
~%put
.
(For example, a PostScript file is an ASCII file, but a
DECwrite file is not.)
You can enter the
cu
to connect host
X
to host
Y
,
log on to host
Y
,
and then enter the
cu
command there to connect to host
Z
.
You then have one local host computer,
X
,
and two remote host computers,
Y
and
Z
.
You can run an operating system command on host
Z
after you log in there. Then, from
Z
,
you can run commands on the other hosts as follows:
X
,
prefix the command with a single tilde
(~
)
Y
,
prefix the command with two tildes
(~~
)
Table 14-2
summarizes the most common
cu
local commands. For information about other
cu
local commands, refer to
cu
(1).
Command | Description |
~.
|
Logs you off the remote computer and terminates the remote connection.
When connected to the remote
host over a telephone line using a modem, this
command does not always work. In such cases,
press Ctrl/d to log off; then type a tilde and a period
( |
~!
|
Returns the session from the remote host to the local host. Type
a tilde and an exclamation point
(~! )
at the prompt and enter any command. To return
to the remote host, press Ctrl/d.
After establishing the
|
~%cd directory_name
|
Changes the current directory on the local host to that specified by the
directory_name
variable. If no directory name is specified,
cu
changes it to your home directory.
|
~%take source [dest]
|
Copies a file from the remote to the local
host. If you do not specify a
dest
destination file on the local host, the
~%take
command copies the remote file to the local host and assigns
the same file name.
|
~%put source [dest]
|
Copies a file from the local to the remote host.
If you do not specify a
dest
destination file on the remote host, the
~%put
command copies the local file to the remote host and assigns
the same file name.
|
~$cmd
|
Execute the
cmd
command on the local host and sends the output to the remote host
for execution by the remote shell.
|
The
tip
command and its options enable you to connect to a remote host,
log in to it, and perform tasks there from your
local host. You can do tasks on each by switching back
and forth between the two.
If both hosts use the operating system,
you can enter commands on the remote host from your local host.
The following steps show how to use the
tip
command to connect from local host
earth
to remote host
moon
,
log in to
moon
,
and enter a command there:
tip
command at the local system prompt; a message verifies the connection:
earth%
tip moon
Connected
The login prompt for the remote host will be displayed. When connecting to some remote hosts, you may need to press the Return key several times before a login prompt is displayed.
moon
at the login prompt. The system prompt for host
moon
is displayed.
moon
supports. For example, to list the contents of the
/usr/geog/crater/darkside
directory, enter the following command at the
system prompt:
moon%
ls /usr/geog/crater/darkside
copernicus.dat tycho.dat
moon%
Note
The preceding example may not work for all
tip
connections. It is used here as a brief, general example. See your system administrator if necessary.
After logging in to the remote host, you can
switch back and forth between it and the local host
because they run concurrently. To return to your local host and
enter a command there, type a tilde and an exclamation point
(~!
)
followed directly by the command, or wait for the local host prompt to
display and then enter the command. To return to the remote host, press
Ctrl/d.
You can use the
tip
command to connect by telephone to a remote host
if the following conditions are met:
/etc/remote
.
The following steps show how to use the
tip
command to connect to a remote host that has
the local telephone number 555-1234
and specifies a transmission rate of 300 baud:
tip
command at the local prompt,
jupiter
;
a message verifies the connection:
jupiter%
tip -300 5551234
Connected
Note
If you do not specify a transmission speed, the
tip
command uses a 1200-baud rate by default. When transferring a large file, you may want to specify the low 300-baud rate for less interference on the line.
The following steps show how to use the
tip
command to connect, with a 300-baud transmission rate, to a remote host
that has a long-distance telephone number of 1-612-555-9876.
tip
command at the prompt of local host
earth
;
a message verifies the connection:
earth%
tip -300 9,16125559876
Connected
For information about customizing the
/etc/remote
and
/etc/phones
files, refer to the book,
Network Administration
and the
remote
(4)
and
phones
(4)
reference pages.
Table 14-3
summarizes the
tip
command options and entries. See the
tip
(1)
reference page for more information.
Option | Description |
-baud_rate
|
Specifies data transmission rate to the remote host. The default rate
is 1200 baud.
Most modems operate at 300, 1200, or 2400 baud, while most hardwired lines are set to 9600 baud or higher. When transferring a large file, you may want to specify the low 300-baud rate for less interference on the line. The baud rate, set when UUCP is installed and customized for your site, is configured according to the hardware used to establish connections. |
-v
|
Displays any variables as they are read (verbose) from the
.tiprc
file.
|
host_name
|
Specifies the remote host
to which you want to connect; the
tip
command connects over a hardwired line or a telephone line using a modem,
depending on how your system communications is set up between the
local and remote hosts.
|
telno
|
Specifies the telephone number in
a remote connection, using a modem. Use this method when the
remote host name is not recognized by
tip
(that is, there is no entry in the
/etc/remote
file).
|
While connected by
tip
to a remote host, you can use local
commands to perform the following tasks:
To return temporarily to the local host and enter commands there, type a
tilde and exclamation point
(~!
)
at the remote system prompt. The local system prompt will
display in the following form, where
shell
is the name of the local shell and
pmt
is the prompt for the local shell, either
%
for the C shell or
$
for the Bourne or Korn shell:
~
[
shell
]
pmt
!
To return to the remote host, press Ctrl/d
at the local system prompt. To terminate the
tip
process, type a tilde and press Ctrl/d
(~^D
).
You can use the following
tip
commands from the remote host to perform tasks on the local host
while you continue working on the remote host. These commands are
preceded by a tilde:
~c
|
change the local directory |
~t
|
copy a file from the remote host to a file on the local host |
~<
|
copy a file from the remote host to a file on the local host |
~p
|
copy a file from the local host to a file on the remote host |
~>
|
copy a file from the local host to a file on the remote host |
For example, while connected by
tip
to remote host
moon
,
you can change the current directory on local host
earth
,
from
/usr/geog/polar
to
/usr/geog/polar/arctic
by entering the following command:
moon%
~c arctic
While connected by
tip
to remote host
moon
,
you can copy the
/usr/darkside/temp/dat
file to the
/usr/NASA/bios/temp
file on local host
earth
by entering the following command:
moon%
~t /usr/darkside/temp/dat /usr/NASA/bios/temp
While connected by
tip
to remote host
moon
,
you can copy the local
/usr/NASA/bios/warn
file to the
/usr/darkside/temp/change
file on the remote host by entering the
following command:
moon%
~p /usr/NASA/bios/warn /usr/darkside/temp/change
Note
You can only transfer ASCII files with the
~t
and~p
commands. (For example, a PostScript file is an ASCII file, but a DECwrite file is not.)
Neither
~t
nor
~p
checks for file transfer errors; the
uucp
command provides this verification.
You can enter the
tip
command to connect host
X
to host
Y
,
log on to host
Y
,
and then enter the
tip
command there (if
Y
supports
tip
)
to connect to host
Z
.
You then have one local host computer,
X
,
and two remote host computers,
Y
and
Z
.
You can run an operating system command on host
Z
(if
Z
is a
Digital UNIX
host) after you log in there. Then, from
Z
,
you can run commands on the other hosts as follows:
X
,
prefix the command with a single tilde
(~
)
Y
,
prefix the command with two tildes
(~~
)
Note
A command sequence that begins with a tilde (
~
) can be interpreted bytip
only if it is at the beginning of the command line.
Table 14-4
summarizes the most common
tip
local commands. For information about other
tip
local commands, refer to
tip
(1).
Command | Description |
~ Ctrl/d
|
Logs you off the remote computer and terminates the remote connection.
When connected to the remote
host over a telephone line using a modem, this
does not always work. In such cases, press Ctrl/d to
log off; then enter
|
~.
|
Logs you off the remote computer and terminates the remote connection.
When connected to the remote
host over a telephone line using a modem, this
does not always work. In such cases, press Ctrl/d
to log off; then enter
|
~!
|
Returns the session from the remote host to a shell on the local host.
Type a tilde and an exclamation point
(~! )
at the prompt to enter any command. To return
to the remote host, press Ctrl/d.
After establishing the
|
~c directory_name
|
Changes the current directory on the local host to that specified by the
directory_name
variable. If no directory name is specified,
tip
changes it to your home directory.
|
~t source [dest]
|
Copies a file from the remote to the local host.
If you do not specify a
dest
destination file on the local host, the
~t
command copies the remote file to the local
host and assigns the same file name.
|
~p source [dest]
|
Copies a file from the local to the remote host.
If you do not specify a
dest
destination file on the remote host, the
~p
command copies the local file to the remote host
and assigns the same file name.
|
~<
|
Copies a file from the remote to the local host; the
tip
command prompts for the command string that
will be used on the remote host to display the remote file, and
the name of the local file, for example,
cat
filename .
|
~>
|
Copies a file from the local to the remote host; the
tip
command prompts for the name of the local file and sends the
the file to the remote host as if it were standard
input. The user should set up a command on the remote host
to accept this input before executing the
~>
command. For example,
remote%
cat >
destination-file .
|
Note
The
tip
program uses system prompts and character sequences that match a system's interrupt sequence to signal the end of file transfers through the~<
or~>
command. These values are configured in the/etc/remote
file. See theremote
(4) reference page for more information.
The
ct
command enables a user on a remote ASCII terminal with a modem
to communicate with a local host with a modem over a
telephone line. The remote terminal user can then log
in and work on the local host.
If there are no available telephone lines, the
ct
command displays a message and asks if you want to wait for one.
The
ct
command is useful in the following situations:
Because the local host
contacts the remote terminal, the remote user does not need to know
the telephone number of the local host. The local user entering
ct
can monitor the work of the remote user.
-h
option can be omitted to emulate making a collect call.
The user on a remote terminal enters the
ct
command without the
-h
option.
The following
ct
features are useful under certain circumstances:
ct
to continue dialing a number until the
connection is established or until a set length of time has elapsed.
ct
can dial each modem until a connection is established.
Note
Usually, a user on the remote terminal calls the user on the local host to request a
ct
session. If such connections occur often, your system manager may want to set up UUCP so that a local host automatically entersct
to one or more specified terminals at a designated time. For information about customizing UUCP, see your system administrator.
For example, to connect to a remote terminal modem at the same site as yours, enter the following command. The remote modem has a telephone number of 7-6092:
earth%
ct 76092
Allocated dialer at 1200 baud Confirm hang_up? (y to hang_up)
After entering the command, a message verifies the connection
and prompts you to either hang up any other phone lines currently in use or
cancel the command.
The following example shows how to use the
ct
command to connect to a remote terminal modem with a
local telephone number of 555-0043, specifying 9
for an outside line and the
-w
option for a 2-minute wait for the modem line:
earth%
ct -w2 9=5550043
Allocated dialer at 1200 baud Confirm hang_up? (y to hang_up)
As before, you are prompted to either hang up any other phone lines currently in use or cancel the command.
The following example shows how to use the
ct
command to connect from local host
earth
,
to a remote terminal modem with a
long-distance number of 1-201-555-7824, specifying 9
for an outside line and the
-w
option for a 5-minute wait for the modem line:
earth%
ct -w5 9=12015557824
Allocated dialer at 1200 baud Confirm hang_up? (y to hang_up)
You are prompted to either hang up any other phone lines currently in use or cancel the command.
See the
ct
(1)
reference page for more information.
Table 14-5
summarizes
ct
command options and required entries.
Option | Description |
-wminutes
|
Specifies the maximum length of time in minutes that the
ct
command waits for a line. The
ct
command dials the remote modem at one-minute intervals
until the connection is established or the specified number of
minutes has passed.
Using the
|
-xnumber
|
Produces detailed information about the command's execution on standard error output on the local host, to be used for debugging. The debugging level, number, is a single digit in the range from 0-9; the recommended default is 9. |
-v
|
Enables the
ct
command to send a running narrative to standard error output.
|
-h
|
Prevents
ct
from breaking the current connection.
|
-sspeed
|
Specifies the data transmission rate of
ct ;
the default is 1200-baud. Set the baud rate to the baud rate of
the terminal to which you are connecting.
|
telno
|
Specifies the phone number of the remote modem. You can enter a local
or a long-distance number, and specify
secondary dial tones such as
9
for an outside line, or an access code.
Use an equal sign
( |
The
uux
command enables you to run commands on a
remote host while you work on your local host.
If the command does not exist on the remote host,
uux
does not execute, and the remote host will notify you by mail.
If the command executes and
produces output (for example,
cat
or
diff
),
you can specify that
uux
place that output
in a file on any specified host.
Note
For security reasons, certain sites may restrict the use of some commands through
uux
. Also, enhanced security features on the local host may affect whether certain commands can be run on remote hosts throughuux
. See your system administrator for more information.
The
uux
command syntax depends on how the command interpreter of a given shell
treats special characters. The
syntax is the same for the Bourne and Korn shells, but different for
the C shell.
Regardless of the shell from which you use
uux
,
there are two ways to specify the destination:
uux
[
option...
]
"
commandstring
>
destination
"
uux
[
option...
]
commandstring
\
{
destination
\
}
In the first syntax statement, the right-angle bracket
(the redirection symbol)
(>
)
directs the output of the
remote command to a destination directory or file.
A pair of double quotation marks (" ")
encloses the entire command because the redirection symbol,
the right-angle bracket
(>)
,
is a special character. Whenever you use any of the following
characters in a command line, you must enclose that character or
the entire command in double quotation (" ") marks:
(<)
(>)
(;)
(|)
(+)
([)
(])
(?)
In the second syntax statement, enclose the destination name within
braces
({ })
.
You must type a backslash
(\
)
before each brace because
braces are special characters to the shell command interpreter.
Without backslashes, the braces would be misinterpreted.
When specifying the pathname of a destination file, you can use
a full name, or a pathname preceded by
Output files must be writable. If you are uncertain about the
permission status of a specific target output file, direct the results of the
command to the
The following example shows how the
In the following example, the task is the
same as in the previous command, but braces
(
To perform the same operation as in the previous section, but in the C
shell, enter one of the following
The following example uses an implicit destination output file:
In the two following examples,
The following example uses an implicit destination output file:
The
You can also represent the local host by using just an
exclamation point, as in the following example:
When you specify the pathname source file in commands such as
If you use the left-angle bracket
Note
The shell redirection characters, two left-angle brackets
Table 14-6
summarizes
The
The
On UNIX based computers (such as
Digital UNIX
that support the UUCP protocol), you can use the
To facilitate file transfers, many sites make the
public UUCP directory,
Note
File transfer through
The system administrator defines security restrictions to prevent
unwarranted use by remote users, so only certain directories and files
may be accessible for sending or receiving files.
From the Bourne or Korn shells, you can specify
To copy the same file and explicitly identify the
If you need to copy a file to a remote host whose address is unknown to
your local host, you can do so via another host that knows the remote
host's address. You can copy a local file to a remote host by first
sending it to one or more intermediate hosts, separating each
host name by an exclamation point
(
You can use
You can copy multiple
files from a remote host to a local host by using
a pattern-matching character to specify files.
For example, to copy all files with names beginning with
In the C shell, the exclamation point
(
For example, to copy the
To copy the
To copy all files with names beginning with
Here, the pattern-matching character, the asterisk
(
Table 14-7
summarizes
The
Note
Any file transfer is subject to the
security features on the local and remote hosts.
See your system administrator
for more information.
For example, to send the
The
At the
Table 14-8
summarizes the
See the
You can also use
Table 14-9
summarizes
The UUCP utilities include three commands,
The
Status reports from
Note
Any status display operation is subject to the
security features on the local and remote hosts.
See your system administrator for more information.
Entering
Two types of output information, each produced by a
Note
After the set time period has elapsed, delete the entries in the holding
queue manually with the
To examine the status of all UUCP jobs in the holding queue,
enter the
This example output consists of the following seven fields:
To report the status of all UUCP jobs in the holding queue requested
by a specific host, enter the
This output is the same as the output produced by
the command
To examine the status of all UUCP jobs currently executing or queued
to run on each host (the current queue)
enter the
This example output consists of the following five fields:
See the
Table 14-10
summarizes
For example, the status is reported as successful
if the UUCP request executed. If the job was not
completed, UUCP reports an error message, such as
You can use both the
Whenever the local host uses the
The uulog command displays the contents of the log file activity
of either of the following daemons:
To display just the
The
To display the last 40 lines of the file transfer log for host
Table 14-11
summarizes
The
The
For more information, see the
~
user/
where
user
is the name of the user's login directory.
/usr/spool/uucppublic
directory;
~uucp
is a brief way of specifying this
directory from a shell.
14.4.1 Using uux from the Bourne or Korn Shells
uux
command uses the operating system
cat
command to concatenate the
/u/doc/F1
file located on host
gem
,
with the
/usr/doc/F2
file located on host
sky
.
The result is placed in the
/u/doc/F3
file on host
gem
.
uux "gem!cat gem!/u/doc/F1 sky!/usr/doc/F2 > gem!/u/doc/F3"
{ }
)
are used instead of the redirection symbol to
specify the destination in the
uux
command line. The task is the same as in the previous
command, but the destination output is implicit:
uux gem!cat gem!/u/doc/F1 sky!/usr/doc/F2 \{gem!/u/doc/F3\}
14.4.2 Using uux from the C Shell
uux
commands:
uux "gem\!cat gem\!/u/doc/F1 sky\!/usr/doc/F2 > gem\!/u/doc/F3"
uux gem\!cat gem\!/u/doc/F1 sky\!/usr/doc/F2 \{gem\!/u/doc/F3\}
uux
uses the
cat
command to send the
acct6
file from remote host
boston
,
as output to the
acct6
file in the public directory on your local host:
uux "cat boston\!/reports/acct6 > ~uucp/acct6"
uux cat boston\!/reports/acct6 \{~uucp/acct6\}
14.4.3 Other uux Features and Suggestions
uux
command assumes your local host is the default, so you do not need
to specify it in the command line. For example, to run the
diff
command to compare the
/u/F1
file on host
car
with the
/u/F2
file on host
sea
,
and place the result in the
/u/F3
file on the local host, use the following command:
uux "diff car!/u/F1 sea!/u/F2 > /u/F3"
uux "!diff car!/u/F1 sea!/u/F2 > !/u/F3"
diff
or
cat
,
you can include the following shell pattern-matching characters
which the remote host will interpret: the question-mark
(?)
,
the asterisk
(*)
,
the left-bracket
([)
,
and the right bracket
(])
.
Enclose these characters either within two
backslashes (\ ... \) or within quotation
marks (" ... ") so that the local shell does not interpret the
characters before
uux
sends the command to the remote host.
Do not use pattern-matching characters in destination names.
(<)
,
the right angle-bracket
(>)
,
the semi-colon
(;)
,
and the pipe
(|)
shell characters, place them within
backslashes (\ ... \), quotation
marks (" ... "), or place the entire command line
within backslashes or quotation marks.
(<<)
and two right-angle brackets
(>>)
,
do not work in UUCP.
uux
command options and required entries. See the
uux
(1)
reference page for more information.
Table 14-6: Options to the uux Command
Option
Description
-n
Cancels notification through
mailx
that usually occurs when a command fails to execute on the designated host.
-n
and
-z
options are mutually exclusive.
-z
Sends a message through
mailx
when command execution fails on the designated host.
-n
and
-z
options are mutually exclusive.
-j
Displays the job identification number of the
uux
request that runs the remote command; use
this number with the
uustat
command. See Section 13.8.1 for more information.
commandstring
Specifies any command accepted by the designated host.
For more information on the command formats, see
Section 13.4.
destination_name
Specifies the host and file for storing the output of the command run on a
remote host. For example, if you want to list all the files in a
directory on a remote host, you can use
uux
to place the listing in a file on your
own host by entering the appropriate destination name.
For more information on the destination formats, see
Section 13.4.
14.5 Using UUCP To Send and Receive Files
uucp
command to copy one or more files from one computer to another.
You can use
uucp
to copy files as follows:
usr/spool/uucppublic
,
available. This directory provides
read and write access to all users and bypasses
security restrictions. The brief way to specify this
directory is
~uucp
or
~/
in a
uucp
command.
uucp
is subject to security features on either host. The
uucp
utility does not display error messages for failed file transfers.
For more information, see your system administrator.
14.5.1 Using UUCP to Copy Files in the Bourne and Korn Shells
uucp
file names without using a backslash
(\
)
before the exclamation point
(!
)
that precedes the host name of the
destination file. For example, to copy the
star
file from local host
earth
to the
/sun/stats
file in the public directory on the remote host
sky
,
enter the following command:
earth%
uucp star sky!~/sun/stats
/usr/spool/uucppublic
directory, enter the following command:
earth%
uucp star sky!/usr/spool/uucppublic/sun/stats
!
).
For example, to copy the local file
star
to the
/sun/stats
file on the remote host
sky
by first sending it through the intermediate host,
mlkway
,
enter the following command:
earth%
uucp star mlkway!sky!~uucp/sun/stats
uucp
from your local host to copy a file from a remote host
to your local host. For example, to copy the
/cells/type1
file from remote host
biochem
to the local file,
/dna/sequence
,
enter the following command from local host
earth
:
earth%
uucp biochem!/cells/type1 /dna/sequence
report
from the
/geog/survey
directory on remote host
moon
to the
~uucp
public directory on local host
earth
,
enter the following command:
earth%
uucp moon\!/geog/survey/report* ~uucp
14.5.2 Using UUCP to Copy Files in the C Shell
!
)
has a special meaning. To prevent the command interpreter from
mistranslating it, you must precede it with a backslash
(\
)
in a pathname.
/usr/NASA/ctrl-specs
file from local host
earth
to the
~uucp
public directory on remote host
luna7
,
enter the following command from the local host:
earth%
uucp /usr/NASA/ctrl-specs luna7\!~uucp
plan9
file from the
/usr/reports/exobio
directory on remote host
luna7
to the
~uucp
public directory on local host
earth
,
enter the following command:
earth%
uucp luna7\!/usr/reports/exobio/plan9 ~uucp
msg
from the
/sensory/visual/earthrise
directory on the remote host
luna7
to the
~uucp
public directory on local host
earth
,
you can enter the following command:
earth%
uucp luna7\!/sensory/visual/earthrise/msg'*' ~uucp
*
)
in the source file names is enclosed within single quotation
marks to prevent misinterpretation.
In the next example, the same files are copied to
~uucp
,
but the entire pathname of the source files is enclosed in double
quotation marks to prevent misinterpretation:
earth%
uucp "luna7\!/sensory/visual/earthrise/msg*" ~uucp
uucp
command options and required entries. See the
uucp
(1)
reference page for more information.
Table 14-7: Options to the UUCP Command
Option
Description
-d
Creates intermediate
directories needed when copying a source file to a destination file on a remote
host. Entering
uucp
with the destination pathname creates the required directory. The
-d
option is the default.
-f
Do not create intermediate directories during the file transfer.
-j
Displays the job identification number of the transfer
operation; use with the
uustat
command to check transfer status, or with
uustat -k
to terminate the transfer. See Section 13.8.1 for more information.
-m
Specifies that
uucp
send mail to the requester
to verify copying of destination file on a
remote host; no mail is sent for a local transfer.
-nusername
Notifies the recipient,
username
on the remote host, that a file has been sent; no
mail is sent for a local transfer.
source_file
Specifies the pathname of the file that you want
to send or receive. For more information about UUCP pathnames,
see Section 13.1.
destination_name
Specifies the pathname of the file (or directory) that receives the copy.
For more information about destination file pathnames,
see Section 13.5.1 and Section 13.5.2.
14.6 Using uuto with uupick to Copy Files
uuto
command copies the file you specify to the
public directory on the destination host where it is obtained by
the recipient through
uupick
.
The
rmail
program notifies the recipient when the file arrives.
/usr/bin/data/junk
file from local host
moe
to user
curly
on remote host
stooge
,
enter the following command:
moe%
uuto /usr/bin/data/junk stooge!curly
uuto
command copies the file to the
/usr/spool/uucppublic/receive/curly/moe
file on host
stooge
.
Next, the
rmail
utility sends user
curly
a mail message stating that the file has arrived. User
curly
can then enter the
uupick
command to access the file and save, move, or delete it.
In the following example, user
curly
enters the
uupick
command on host
stooge
;
the response from
uupick
follows:
stooge%
uupick
from system moe: file junk
?
uupick
question mark
(?
)
prompt, user
curly
enters the
d
and
q
options to delete the file and exit from
uupick
:
?
d
?
q
uupick
file handling options,
entered at the
?
uupick
prompt.
Table 14-8: Options to the uupick Command
Option
Description
*
Displays available
uupick
file-handling options.
Return
Pressing the Return key signals
uupick
to get the next file.
a [dir]
Moves all
uuto
files from the public directory to the
specified directory on the local host; specify
the directory by using a full or relative pathname.
The default is the directory where you enter
uupick
.
d
The
d
option deletes the current file obtained by
uupick
.
m [dir]
Moves a file to a directory specified by
either full or relative pathname;
the default is the current
directory.
p
Displays the file on your workstation.
q or Ctrl/d
The
q
(quit) option enables you to exit from
uupick
without displaying, moving, or deleting any file
in the public directory. You
can also press Ctrl/d to quit.
!command
Enables you to leave
uupick
and return to the operating system prompt where you can run a command. After
the command executes, control returns to
uupick
.
uupick
(1)
reference page for more information.
14.7 Using uuto to Send a File Locally
uuto
to send a file to another user on your local host.
However, the recipient does not receive a mail message indicating
the file transfer. For example, user
shemp
can send the file
/usr/bin/data/status
to user
larry
on local host
stooge
,
where each is logged in:
stooge%
uuto /usr/bin/data/status larry
uuto
command options and required entries. See the
uuto
(1)
reference page for more information.
Table 14-9: Options to the uuto Command
Option
Description
-m
Notifies sender when
uuto
copies a source file to the specified user name and host.
-p
Usually,
uuto
copies the source file to:
/usr/spool/uucppublic/receive
/username/host/file
.
The
-p
option sends the source file to the spool directory
on the local host before transferring a copy of it to
the public directory on the specified host.
file_name
The pathname of the source file.
destination_name
The pathname to the location where you want to copy the source file.
The
destination_name
must include the user name of the person receiving the file, and
has the form, host!username, where
host
is the name of the remote computer and
username
is the user name of the recipient. When copying a file
on your local host, the
destination_name
can be simply the name of the user to whom you
are sending the file.
14.8 Displaying Job Status of UUCP Utilities
uustat
,
uulog
,
and
uumonitor
for displaying status information about
UUCP jobs, as described in the following sections.
14.8.1 The uustat Command
uustat
command supports UUCP jobs by providing the following:
uucp
and
uuto
uux
uucp
uustat
display on your
workstation screen in this basic form; variations depend on the
uustat
option.
jobid date/time status system_name username size file
uustat
without options displays the status information
for all the UUCP commands that you have
entered since the last time the holding queue was cleaned up.
To report the status of jobs requested by a specific user, use the
-u
option, as shown here, for user
hugh
:
%
uustat -u hugh
uustat
option, are the current queue and the holding queue:
The output of the
uustat -q
command is the
current queue,
which lists the UUCP jobs either
queued to run or currently executing on one or more remote hosts.
The output of the
uustat -a
command is the
holding queue,
which lists all jobs that have not executed during
a set period of time.
uucleanup
command or automatically through the
uudemon.cleanu
script.
The
uudemon.cleanu
script has an entry in
/usr/spool/cron/crontabs/uucp
which is activated by the
/etc/cron
daemon. For more information about
cleaning up UUCP queues, see the
uucleanup
(8)
reference page or your system administrator.
14.8.1.1 Displaying the Holding Queue Output with a uustat Option
uustat -a
command as shown here with example output:
%
uustat -a
sunC3113 Thu Jun 04 17:47:25 1996 S sun doc 289 D.car471afd8
gemN3130 Thu Jun 04 09:14:30 1996 R gem geo 338 D.car471bc0a
seaC3120 Wed Jun 03 16:02:33 1996 S sea doc 828 /u/doc/tt
seaC3119 Wed Jun 03 12:32:01 1996 S sea msg rmail doc
uustat
command with the
-k
option, for example,
%
uustat -k seaC3119
rmail
).
/u/doc/tt
or a name that UUCP assigns internally to data
files associated with remote executions, such as
D.car471afd8
.
uustat -s
command as shown here with example output, for host
sky
:
%
uustat -s sky
skyNlbd7 Wed Jun 03 12:09:30 1996 S sky doc 522 /user/doc/A
skyClbd8 Wed Jun 03 12:10:15 1996 S sky doc 59 D.3b2a12ce4924
skyC3119 Wed Jun 03 12:11:18 1996 S sky doc rmail msg
uustat -a -s sky
.
14.8.1.2 Displaying the Current Queue Output with uustat Options
uustat -q
command as shown here with example output:
%
uustat -q
sea 3C Mon Jul 13 09:14:35 1996 NO DEVICES AVAILABLE
sun 2C Mon Jul 13 10:02:22 1996 SUCCESSFUL
gem 1C (2) Mon Jul 13 10:12:48 1996 CAN'T ACCESS DEVICE
C
),
or executable
(X
),
in the holding queue for that host
uustat
(1)
reference page for more information.
uustat
command options and required entries.
Table 14-10: Options to the uustat Command
Option
Description
-a
Displays information for all jobs in the holding
queue, regardless of the user who
entered the original UUCP command.
-k jobid
Cancels the UUCP process specified by
jobid
.
You can cancel a job only if you entered the
UUCP command specified by
jobid
.
Anyone with superuser privileges can also cancel UUCP requests.
-m
Reports on the status of your most recent attempt
to communicate with another computer through UUCP.
Login failed
.
-p
Useful only to someone with superuser privileges, it runs a
ps -flp
(process status: a full, long list of specified
process IDs) for all PID numbers in the lock files.
-q
Lists the jobs currently queued for each computer.
These jobs are either waiting to execute, or in the process of executing.
If a status file exists for the computer, UUCP reports its date, time, and the
status information. Once the process is completed, UUCP removes the job
listing from the current queue.
-r jobid
Rejuvenates the UUCP
process specified by the job identification number. This option enables you
to mark files in the holding queue with the current date and time, to
ensure that the cleanup operation does not delete these files until
the allotted job modification time ends.
-shost
Reports the status of all UUCP
requests that users have entered to run on the computer specified by the
host entry.
-uusername
Reports the status of all UUCP requests entered to run that were
specified by the user named in the user entry.
-shost
and the
-uusername
options with the
uustat
command to get a status report on all UUCP requests entered by a specified user
and host.
14.8.2 Using the uulog Command to Display UUCP Log Files
uucp
,
uuto,
or
uux
commands, UUCP log files are created for each remote host.
The
uulog
command displays these log files. Use
uulog
to display a summary of
uucp
,
uuto
,
and
uux
command requests by user or by host.
uucico
daemon, called by
uucp
and
uuto
The activity of this daemon is logged in
/usr/spool/uucp/.Log/uucico/
host.
uuxqt
daemon, called by
uux
The activity of this daemon is logged in
/usr/spool/uucp/.Log/uuxqt/
host.
uuxqt
log file, use the
-x
option of
uulog
,
as follows:
%
uulog -x
uulog
command also enables you to display the
uucico
log file or the file transfer log for any host, or only a specified number
of lines at the end of either log file. For example, to display the
uucico
log file for host
sky
,
use the
-s
option as follows:
%
uulog -s sky
sky
,
use the
-f
option and the number option as shown:
%
uulog -f sky -40
uulog
command options and required entries.
Table 14-11: Options to the uulog Command
Option
Description
-fhost
Performs a
tail -f
on the file transfer log for the specified host,
displaying the end of the log file. Use the
Interrupt
key sequence to leave the file and return to the prompt.
-s[host]
Prints information about copy requests involving the specified
host. If no host is specified, information is displayed for all
hosts. Host names can contain only ASCII characters.
-x
Displays the
uuxqt
log file.
-number
Displays the last lines of the log file. The number of lines is
determined by number.
14.8.3 Monitoring UUCP Status
uumonitor
command is helpful for detecting a host whose status has changed due to
a backlog of jobs, a temporary shutdown, or a change of either the phone
number or log-in password.
uumonitor
output consists of the following six fields:
uumonitor
(8)
reference page.