This chapter describes how to run the UUCP programs.
All of the UUCP programs support a few standard options.
debug
configuration command for details (see section Debugging Levels).
Multiple types may be given, separated by commas, and the `--debug'
option may appear multiple times. A number may also be given, which
will turn on that many types from the foregoing list; for example,
`--debug 2' is equivalent to `--debug abnormal,chat'. To turn
on all types of debugging, use `-x all'.
The uulog program uses `-X' rather than `-x' to select
the debugging type; for uulog, `-x' has a different meaning,
for reasons of historical compatibility.
uucp [options] `source-file' `destination-file' uucp [options] `source-file'... `destination-directory'
The uucp command copies files between systems. Each `file'
argument is either a file name on the local machine or is of the form
`system!file'. The latter is interpreted as being on a remote
system.
When uucp is used with two non-option arguments, the contents of
the first file are copied to the second. With more than two non-option
arguments, each source file is copied into the destination directory.
A file may be transferred to or from `system2' via `system1' by using `system1!system2!file'.
Any file name that does not begin with `/' or `~' will be prepended with the current directory (unless the `-W' or `--noexpand' options are used). For example, if you are in the directory `/home/ian', then `uucp foo remote!bar' is equivalent to `uucp /home/ian/foo remote!/home/ian/bar'. Note that the resulting file name may not be valid on a remote system.
A file name beginning with a simple `~' starts at the UUCP public
directory; a file name beginning with `~name' starts at the home
directory of the named user. The `~' is interpreted on the
appropriate system. Note that some shells will interpret an initial
`~' before uucp sees it; to avoid this the `~' must be
quoted.
The shell metacharacters `?' `*' `[' and `]' are interpreted on the appropriate system, assuming they are quoted to prevent the shell from interpreting them first.
The file copy does not take place immediately, but is queued up for the
uucico daemon; the daemon is started immediately unless the
`-r' or `--nouucico' option is given. The next time the
remote system is called, the file(s) will be copied. See section Invoking uucico.
The file mode is not preserved, except for the execute bit. The resulting file is owned by the uucp user.
The following options may be given to uucp.
uucico daemon, the copy
will fail. The files must be readable by the uucico daemon, and
by the invoking user.
uucico daemon immediately; merely queue up the
file transfer for later execution.
uustat.
See section Invoking uustat.
It is possible for some complex operations to produce more than one
jobid, in which case each will be printed on a separate line. For
example
uucp sys1!~user1/file1 sys2!~user2/file2 ~user3will generate two separate jobs, one for the system `sys1' and one for the system `sys2'.
uuto shell script; see section Invoking uuto. It causes uucp to interpret the final argument as
`system!user'. The file(s) are sent to
`~/receive/user/local' on the remote system, where
user is from the final argument and local is the local UUCP
system name. Also, uucp will act as though `--notify user'
were specified.
uux [options] command
The uux command is used to execute a command on a remote system,
or to execute a command on the local system using files from remote
systems. The command is not executed immediately; the request is queued
until the uucico daemon calls the system and transfers the
necessary files. The daemon is started automatically unless one of the
`-r' or `--nouucico' options is given.
The actual command execution is done by the uuxqt daemon on the
appropriate system.
File arguments can be gathered from remote systems to the execution system, as can standard input. Standard output may be directed to a file on a remote system.
The command name may be preceded by a system name followed by an exclamation point if it is to be executed on a remote system. An empty system name is taken as the local system.
Each argument that contains an exclamation point is treated as naming a file. The system which the file is on is before the exclamation point, and the file name on that system follows it. An empty system name is taken as the local system; this form must be used to transfer a file to a command being executed on a remote system. If the file name is not absolute, the current working directory will be prepended to it; the result may not be meaningful on the remote system. A file name may begin with `~/', in which case it is relative to the UUCP public directory on the appropriate system. A file name may begin with `~name/', in which case it is relative to the home directory of the named user on the appropriate system.
Standard input and output may be redirected as usual; the file names
used may contain exclamation points to indicate that they are on remote
systems. Note that the redirection characters must be quoted so that
they are passed to uux rather than interpreted by the shell.
Append redirection (`>>') does not work.
All specified files are gathered together into a single directory before execution of the command begins. This means that each file must have a distinct name. For example,
uux 'sys1!diff sys2!~user1/foo sys3!~user2/foo >!foo.diff'will fail because both files will be copied to `sys1' and stored under the name `foo'.
Arguments may be quoted by parentheses to avoid interpretation of
exclamation points. This is useful when executing the uucp
command on a remote system.
Most systems restrict the commands which may be executed using `uux'. Many permit only the execution of `rmail' and `rnews'.
A request to execute an empty command (e.g., `uux sys!') will create a poll file for the specified system; see section Calling Other Systems for an example of why this might be useful.
The following options may be given to uux.
uucico daemon,
the copy will fail. The files must be readable by the uucico
daemon, as well as the by the invoker of uux.
uucico daemon, the changed versions will be used. The files must
be readable by the uucico daemon, as well as by the invoker of
uux.
uuxqt daemons, including the Taylor UUCP uuxqt, this is
the default action; for those, `--notification=error' will have no
effect. However, some uuxqt daemons will send mail if the job
succeeds, unless the `--notification=error' option is used. Some
other uuxqt daemons will not send mail even if the job fails,
unless the `--notification=error' option is used.
uucico daemon immediately; merely queue up the
execution request for later processing.
uustat. See section Invoking uustat. Cancelling any file copies
will make it impossible to complete execution of the job.
Here are some examples of using uux.
uux -z - sys1!rmail user1This will execute the command `rmail user1' on the system `sys1', giving it as standard input whatever is given to
uux
as standard input. If a failure occurs, mail will be sent to the user
who ran the command.
uux 'diff -c sys1!~user1/file1 sys2!~user2/file2 >!file.diff'This will fetch the two named files from system `sys1' and system `sys2' and execute `diff', putting the result in `file.diff' in the current directory on the local system. The current directory must be writable by the
uuxqt daemon for this
to work.
uux 'sys1!uucp ~user1/file1 (sys2!~user2/file2)'Execute
uucp on the system `sys1' copying `file1' (on
system `sys1') to `sys2'. This illustrates the use of
parentheses for quoting.
uustat -a
uustat --all
uustat [-eKRiMNQ] [-sS system] [-uU user] [-cC command] [-oy hours]
[-B lines] [--executions] [--kill-all] [--rejuvenate-all]
[--prompt] [--mail] [--notify] [--no-list] [--system system]
[--not-system system] [--user user] [--not-user user]
[--command command] [--not-command command] [--older-than hours]
[--younger-than hours] [--mail-lines lines]
uustat [-kr jobid] [--kill jobid] [--rejuvenate jobid]
uustat -q [-sS system] [-oy hours] [--system system]
[--not-system system ] [--older-than hours] [--younger-than hours]
uustat --list [-sS system] [-oy hours] [--system system ]
[--not-system system] [--older-than hours] [--younger-than hours]
uustat -m
uustat --status
uustat -p
uustat --ps
The uustat command can display various types of status
information about the UUCP system. It can also be used to cancel or
rejuvenate requests made by uucp or uux.
With no options, uustat displays all jobs queued up for the
invoking user, as if given the `--user' option with the appropriate
argument.
If any of the `-a', `--all', `-e', `--executions', `-s', `--system', `-S', `--not-system', `-u', `--user', `-U', `--not-user', `-c', `--command', `-C', `--not-command', `-o', `--older-than', `-y', or `--younger-than' options are given, then all jobs which match the combined specifications are displayed.
The `-K' or `--kill-all' option may be used to kill off a selected group of jobs, such as all jobs more than 7 days old.
The following options may be given to uustat.
uuxqt
rather than uucico. Queued execution requests may be waiting for
some file to be transferred from a remote system. They are created by
an invocation of uux.
uucp or
uux. A job may only be killed by the user who created the job,
or by the UUCP administrator, or the superuser. The `-k' or
`--kill' options may be used multiple times on the command line to
kill several jobs.
uucp or uux. A job may only be
rejuvenated by the user who created the job, or by the UUCP
administrator, or the superuser. The `-r' or `--rejuvenate'
options may be used multiple times on the command line to rejuvenate
several jobs.
uustat --allDisplay status of all jobs. A sample output line is as follows:
bugsA027h bugs ian 04-01 13:50 Executing rmail ian@airs.com (sending 12 bytes)The format is
jobid system user queue-date command (size)The jobid may be passed to the `--kill' or `--rejuvenate' options. The size indicates how much data is to be transferred to the remote system, and is absent for a file receive request. The `--system', `--not-system', `--user', `--not-user', `--command', `--not-command', `--older-than', and `--younger-than' options may be used to control which jobs are listed.
uustat --executionsDisplay status of queued up execution requests. A sample output line is as follows:
bugs bugs!ian 05-20 12:51 rmail ianThe format is
system requestor queue-date commandThe `--system', `--not-system', `--user', `--not-user', `--command', `--not-command', `--older-than', and `--younger-than' options may be used to control which requests are listed.
uustat --listDisplay status for all systems with queued up commands. A sample output line is as follows:
bugs 4C (1 hour) 0X (0 secs) 04-01 14:45 Dial failedThis indicates the system, the number of queued commands, the age of the oldest queued command, the number of queued local executions, the age of the oldest queued execution, the date of the last conversation, and the status of that conversation.
uustat --statusDisplay conversation status for all remote systems. A sample output line is as follows:
bugs 04-01 15:51 Conversation completeThis indicates the system, the date of the last conversation, and the status of that conversation. If the last conversation failed,
uustat will indicate how many attempts have been made to call the
system. If the retry period is currently preventing calls to that
system, uustat also displays the time when the next call will be
permitted.
uustat --psDisplay the status of all processes holding UUCP locks. The output format is system dependent, as
uustat simply invokes ps on
each process holding a lock.
uustat -c rmail -o 168 -K -Q -M -N -W "Queued for over 1 week"This will kill all `rmail' commands that have been queued up waiting for delivery for over 1 week (168 hours). For each such command, mail will be sent both to the UUCP administrator and to the user who requested the rmail execution. The mail message sent will include the string given by the `-W' option. The `-Q' option prevents any of the jobs from being listed on the terminal, so any output from the program will be error messages.
uuname [-a] [--aliases] uuname -l uuname --local
By default, the uuname program simply lists the names of all the
remote systems mentioned in the UUCP configuration files.
The uuname program may also be used to print the UUCP name of the
local system.
The uuname program is mainly for use by shell scripts.
The following options may be given to uuname.
uulog [-#] [-n lines] [-sf system] [-u user] [-DSF] [--lines lines]
[--system system] [--user user] [--debuglog] [--statslog]
[--follow] [--follow=system]
The uulog program may be used to display the UUCP log file.
Different options may be used to select which parts of the file to
display.
uulog specifies the debugging
type using `-X' rather than the usual `-x'.
The operation of uulog depends to some degree upon the type of
log files generated by the UUCP programs. This is a compile time
option. If the UUCP programs have been compiled to use HDB style log
files, uulog changes in the following ways:
uuxqt log file.
uuto files... system!user
The uuto program may be used to conveniently send files to a
particular user on a remote system. It will arrange for mail to be sent
to the remote user when the files arrive on the remote system, and he or
she may easily retrieve the files using the uupick program
(see section Invoking uupick). Note that uuto does not provide any
security--any user on the remote system can examine the files.
The last argument specifies the system and user name to which to send the files. The other arguments are the files or directories to be sent.
The uuto program is actually just a trivial shell script which
invokes the uucp program with the appropriate arguments. Any
option which may be given to uucp may also be given to
uuto. See section Invoking uucp.
uupick [-s system] [--system system]
The uupick program is used to conveniently retrieve files
transferred by the uuto program.
For each file transferred by uuto, uupick will display the
source system, the file name, and whether the name refers to a regular
file or a directory. It will then wait for the user to specify an
action to take. One of the following commands must be entered:
uupick.
The `-s' or `--system' option may be used to restrict
uupick to only present files transferred from a particular
system. The uupick program also supports the standard UUCP
program options; see section Standard Options.
cu [options] [system | phone | "dir"]
The cu program is used to call up another system and act as a
dial in terminal. It can also do simple file transfers with no error
checking.
The cu program takes a single non-option argument.
If the argument is the string `dir' cu will make a direct connection to the port. This may only be used by users with write access to the port, as it permits reprogramming the modem.
Otherwise, if the argument begins with a digit, it is taken to be a phone number to call.
Otherwise, it is taken to be the name of a system to call.
The `-z' or `--system' options may be used to name a system beginning with a digit, and the `-c' or `--phone' options may be used to name a phone number that does not begin with a digit.
The cu program locates a port to use in the UUCP configuration
files. If a simple system name is given, it will select a port
appropriate for that system. The `-p', `--port', `-l',
`--line', `-s', and `--speed' options may be used to
control the port selection.
When a connection is made to the remote system, cu forks into two
processes. One reads from the port and writes to the terminal, while
the other reads from the terminal and writes to the port.
The cu program provides several commands that may be used during
the conversation. The commands all begin with an escape character,
which by default is ~ (tilde). The escape character is only
recognized at the beginning of a line. To send an escape character to
the remote system at the start of a line, it must be entered twice. All
commands are either a single character or a word beginning with %
(percent sign).
The cu program recognizes the following commands.
cu variable to the given value. If value is not given, the
variable is set to `true'.
cu variable to `false'.
The cu program also supports several variables. They may be
listed with the `~v' command, and set with the `~s' or
`~!' commands.
cu will delay for a second, after
recognizing the escape character, before printing the name of the local
system. The default is true.
The following options may be given to cu.
uucico [options]
The uucico daemon processes file transfer requests queued by
uucp and uux. It is started when uucp or
uux is run (unless they are given the `-r' or
`--nouucico' options). It is also typically started periodically
using entries in the `crontab' table(s).
When uucico is invoked with `-r1', `--master',
`-s', `--system', or `-S', the daemon will place a call
to a remote system, running in master mode. Otherwise the daemon will
start in slave mode, accepting a call from a remote system. Typically a
special login name will be set up for UUCP which automatically invokes
uucico when a remote system calls in and logs in under that name.
When uucico terminates, it invokes the uuxqt daemon,
unless the `-q' or `--nouuxqt' options were given;
uuxqt executes any work orders created by uux on a remote
system, and any work orders created locally which have received remote
files for which they were waiting.
If a call fails, uucico will normally refuse to retry the call
until a certain (configurable) amount of time has passed. This may be
overriden by the `-f', `--force', or `-S' options.
The `-l', `--prompt', `-e', or `--loop' options may
be used to force uucico to produce its own prompts of
`login: ' and `Password:'. When another uucico daemon
calls in, it will see these prompts and log in as usual. The login name
and password will normally be checked against a separate list kept
specially for uucico, rather than the `/etc/passwd' file
(see section Configuration File Names). It is possible, on some systems, to
configure uucico to use `/etc/passwd'. The `-l' or
`--prompt' options will prompt once and then exit; in this mode the
UUCP administrator, or the superuser, may use the `-u' or
`--login' option to force a login name, in which case uucico
will not prompt for one. The `-e' or `--loop' options will
prompt again after the first session is over; in this mode uucico
will permanently control a port.
If uucico receives a SIGQUIT, SIGTERM or
SIGPIPE signal, it will cleanly abort any current conversation
with a remote system and exit. If it receives a SIGHUP signal it
will abort any current conversation, but will continue to place calls to
(if invoked with `-r1' or `--master') and accept calls from
(if invoked with `-e' or `--loop') other systems. If it
receives a SIGINT signal it will finish the current conversation,
but will not place or accept any more calls.
The following options may be given to uucico.
uucico to be easily run from
inetd. The login name and password are checked against the UUCP
password file, which need not be `/etc/passwd'. The `--login'
option may be used to force a login name, in which cause uucico
will only prompt for a password.
kill to shut it down.
uuxqt daemon when finished.
uustat). This can be convenient
for automated polling scripts, which may want to simply attempt to call
every system rather than worry about which particular systems may be
called at the moment. This option also suppresses the log message
indicating that there is no work to be done.
uucico
detaches from the terminal before each call out to another system and
before invoking uuxqt. This option prevents this.
uucico to prompt only
for the password, not the login name.
uucico to use TLI calls to perform I/O.
uuxqt [-c command] [-s system] [--command command] [--system system]
The uuxqt daemon executes commands requested by uux from
either the local system or from remote systems. It is started
automatically by the uucico daemon (unless uucico is given
the `-q' or `--nouuxqt' options).
There is normally no need to run uuxqt, since it will be invoked
by uucico. However, uuxqt can be invoked directly to
provide greater control over the processing of the work queue.
Multiple invocations of uuxqt may be run at once, as controlled
by the max-uuxqts configuration command; see section Miscellaneous config File Commands.
The following options may be given to uuxqt.
uuchk [-s system] [--system system]
The uuchk program displays information read from the UUCP
configuration files. It should be used to ensure that UUCP has been
configured correctly.
The `-s' or `--system' options may be used to display the
configuration for just the specified system, rather than for all
systems. The uuchk program also supports the standard UUCP
program options; see section Standard Options.
uuconv -i type -o type [-p program] [--program program] uuconv --input type --output type [-p program] [--program program]
The uuconv program converts UUCP configuration files from one
format to another. The type of configuration file to read is specified
using the `-i' or `--input' options. The type of
configuration file to write is specified using the `-o' or
`--output' options.
The supported configuration file types are `taylor', `v2', and `hdb'. For a description of the `taylor' configuration files, see section Taylor UUCP Configuration Files. The other types of configuration files are used by traditional UUCP packages, and are not described in this manual.
An input configuration of type `v2' or `hdb' is read from a compiled in directory (specified by `oldconfigdir' in `Makefile'). An input configuration of type `taylor' is read from a compiled in directory by default, but may be overridden with the standard `-I' or `--config' options (see section Standard Options).
The output configuration is written to files in the directory in which
uuconv is run.
Some information in the input files may not be representable in the
desired output format, in which case uuconv will silently discard
it. The output of uuconv should be carefully checked before it
is used. The uuchk program may be used for this purpose; see
section Invoking uuchk.
The `-p' or `--program' option may be used to convert specific
cu configuration information, rather than the default of only
converting the uucp configuration information; see section The Main Configuration File.
The uuchk program also supports the standard UUCP program
options; see section Standard Options.
The uusched program is actually just a shell script which invokes
the uucico daemon. It is provided for backward compatibility.
It causes uucico to call all systems for which there is work.
Any option which may be given to uucico may also be given to
uusched. See section Invoking uucico.