uux - Request command execution on remote UUCP systems

Format

uux [-bCcjnprz] [-g grade] [-x debug_level] [site!] commandstring

Description

uux specifies that commandstring be run on another site. If files required to run the command are on different sites, uux generates the UUCP requests to gather the files together on one site, runs the command, and sends the standard output of the command to a file on a specified site.

commandstring is any valid command for the remote site, with arguments, except that the command and any file names can specify a site in the UUCP manner:
site1!command site2!file1
where site1 is the name of the site where the command is to be run, and site2 is the name of the site where file1 is.
  • If you do not specify any site names, then the command and any files are assumed to reside at your site.
  • If you specify a site for the command, but not for the files, then the files are assumed to reside on the same site that is named for the command.
  • If you specify a site for some of the files, then those files without a site name are assumed to reside on the site named.
site must be a valid site name, as listed by the uuname command. Specifying multiple site names, such as site1!site2!command or site1!site2!file is not allowed for uux

Pipes of commands are valid, but only the first command in a pipeline can have a site name. All other commands in the pipeline take place on the site that is specified for the first command.

File names can have one of these forms:
  • A full path name.
  • A path name that is preceded by ~name/, where ~name is replaced on the specified site by the login directory of user name.
  • A path name preceded by ~/, where ~/ is replaced on the specified site with the name of the public UUCP directory.
  • A file name or prefix name containing the current directory on your machine as a prefix.
Unlike arguments to uucp, path names cannot contain the shell metacharacters ?, *, and [ ].

Nonlocal file names must be unique within the command, or the command fails. This is because nonlocal files are copied to a working directory on the remote site; if the filenames are not unique, one overwrites another.

If the command fails, you are notified by electronic mail.

Options

-b
Mails input back to the user. The contents of stdin are sent back to the user if the command fails.
-C
Copies named files to the spool directory for transfer. If both this option and the -C option are given, this option takes precedence. This option is useful if you will be making changes to the file after running the uux command and want to send the version of the file before you changed it.
-c
Does not copy files to the spool directory for transfer. This is the default.
-g grade
Sets the priority of the job to grade. It is a number (0-9) or a letter (A-Z, a-z), where 0 is the highest priority and z is the lowest.
-j
Passes the UUCP job ID number to standard output. This job ID can be used with uustat to determine the job's status or to terminate it. If the uux request generates several job IDs, only the last is shown.
-n
Does not send mail if the command fails.
-p
Uses standard input of uux as the standard input for the specified command. The input is stored in a temporary file that is passed to the command when it runs.
-r
Queues the job to be processed later. Do not start uucico to begin transferring the file.
-x debug_level
Sets the verbosity of the debugging information to debug_level, which is a number that is 0 or greater. Level 0 provides terse messages while level 9 provides verbose messages. Values greater than 9 give no additional information. The default level is 0.
-z
Returns notification of success to the user who issued the uux command.

Commands on remote sites are actually run by uuxqt in its own directory, /usr/spool/uucp/.Xqtdir.

Special characters

The command string passed to uux can use the shell metacharacters. If any of these characters are not valid for the command interpreter on the destination system, the command fails.

More complex redirection, such as 2>, is not handled by uux because the 2 is interpreted as a parameter to the preceding command). Only the simple metacharacters that are listed are allowed.

To escape a file name or quoted string, use parentheses. Parentheses pass the file name to the command on the remote site without special interpretation by uux. For example, the following command will not do what you expect because "hello" is treated as a file unless enclosed in parentheses.
uux "Remote!echo hello >test.out"
The correct way to enter that command is:
uux "Remote!echo (hello) >test.out"

Examples

  1. Suppose that a neighboring site, south, has a program called laser for printing and formatting documents. You have execute permission for laser. To print the file inventor.y in south's public UUCP directory using south's laser program:
    uux south!laser ' ~/inventor.y'

    The tilde needs protection from shell expansion.

    To print the file report.001 in your public UUCP directory:
    uux south!laser ! ~/report.001
  2. Suppose that you have execute permission for uucp on south. To request that south use uucp to copy the file index from its public UUCP directory to west, a neighbor of south:
    uux south!uucp \(~/index\) \(west! ~/\)
    The arguments ~/index and west! ~/ are not interpreted by uux because of the parentheses. The backslashes are necessary to escape the parentheses on the z/OS shell.

Security

uux is potentially a security risk to your system. UUCP minimizes the risk by allowing you to specify the commands that can be run by each remote site. For more information about permission files, see The Permissions file in z/OS UNIX System Services Planning.

For electronic mail, each remote site must be able to execute a mail routing agent on your site. Further permissions can be granted at your discretion.

Localization

uux uses the following localization environment variables:
  • LANG
  • LC_ALL
  • LC_CTYPE
  • LC_MESSAGES

Files

uux uses the following files:
/usr/lib/uucp/config
UUCP configuration file
/usr/spool/uucp/site
Subdirectory containing queued job requests, work files, data files, and execution files for the UUCP host site.
/usr/spool/uucp/LOGFILE
Log file for uux and other UUCP utilities.
/usr/spool/uucp/.Sequence/sitename
Sequence file containing the 4-digit sequence number of the last job queued. If uux requires a sequence number, it is based on the value in this file. If this file does not exist, uux creates it with the sequence number 0000. sitename is the name of a remote site; each remote site has its own sequence number.

Exit values

0
Successful completion.
1
Failure due to any of the following reasons:
  • Argument list too long.
  • Inability to open log file.
  • Insufficient memory.
2
Unknown command-line option.

Portability

POSIX.2, X/Open Portability Guide, UNIX systems.

The -g, -p, -r, and -x options are extensions to the POSIX standard. They are retained for compatibility with other UNIX UUCP implementations.

Related information

uucc, uucico