uux
PURPOSE
Runs a command on another AIX system.
SYNOPSIS
uux [-c -C][-n -z][-a name -b -g grade -i -p -r -s file -xdebug]...
cmdstring
DESCRIPTION
The Basic Networking Utilities (BNU) command uux runs a
specified AIX command on a specified AIX system.
The command gathers various files from the designated
systems, if necessary. It then runs a specified command
on a designated system. The user can direct the output
from the command to a specified file on a specified
system.
Note: For security reasons, many installations permit
uux to run only the rmail command.
The uux command creates execute (X.*) files that run AIX
commands on the local system. In addition, uux also
creates both command (C.*) files and data (D.*) files.
Execute files contain the command string to be executed
on the designated system. Command files contain the same
information as those created by the uucp command. Data
files either contain the data for a remote command exe-
cution, or else become X.* files on remote systems for
remote command executions.
Note: The full path name of an execute file is a form of
the following:
/usr/spool/uucp/system_name/X.system_nameNxxxx
After creating the files in the spooling directory, uux
calls the uucico daemon, which in turn attempts to
contact the designated system to deliver the files. Once
the files are transferred, the uuxqt daemon executes the
cmdstring on the specified system.
The cmdstring is made up of one or more arguments that
look like an AIX command line, except that cmdstring may
be prefixed by system_name!. The default system_name is
the local system.
Note: To run commands on more than one system, type the
information on separate command lines:
uux merlin!print /reports/memos/charles
uux zeus!print /test/examples/examp1
Unless the -n flag is specified, uux notifies the user if
the remote system does not run the command. The response
comes by mail from the other system.
File Names, Path Names, and System Names
o When specifying the destination of the output of a
command, uux may be entered in either one of the fol-
lowing formats:
- uux [options] "cmdstring > destination_name"
- uux [options] cmdstring \{destination_name\}
o Destination names may be either of the following:
- a full path name
- a full path name preceded by ~user, where user is
a login name on the specified system. The uux
command replaces this path name with the user's
login directory.
o The shell pattern-matching characters "?", "*", and
"[ . . . ]" may be used in the path name of a
&ldq.source&rdq. file (such as files compared by the
diff command); the appropriate system expands them.
However, using the * character may occasionally
produce unpredictable or unanticipated results.
Note: Shell pattern-matching characters should not
be used in the destination path name.
o Place either two backslashes (\ . . . \) or a pair of
quotation marks (" . . . ") around pattern-matching
characters in a path name so the local shell cannot
interpret them before uux sends the command to a des-
ignated system.
o If using the special shell characters > (greater
than), < (less than), ; (semicolon), or | (vertical
bar) in a path name, place either \ . . . \ or " . .
. " around the individual character or around the
entire command string.
o Do not use the shell redirection characters << or >>
in a path name.
o The uux command attempts to move all files specified
on the command line to the designated system.
Enclose the names of all output files in parentheses
so that uux does not try to transfer them.
o When specifying a system_name, always place it before
the cmdstring in the entry.
o The exclamation point preceding the name of the local
system in a command is optional. If you choose to
include the ! to run a command on the local system
using files from two different remote systems, use !
instead of system! to represent the local system, and
add system! as the first entry in any path name on
the remote systems.
o The exclamation point representing a remote system in
BNU syntax has a different meaning in c shells (csh).
When running uux in a c shell, place a backslash (\)
before the exclamation point in a system name.
o If the command being executed requests two files
stored on the same system, or two files with the same
name that are stored on separate systems, the command
will execute, but will not produce the desired
results.
The following two commands will execute:
uux "hera!/bin/diff /usr/amy/out1 hera!/u/amy/out > ~uucp/DF"
uux "hera!/bin/diff hera!/usr/amy/out1 venus!/u/amy/out > ~uucp/DF"
Note: The notation "~uucp" is the shorthand way of
specifying the public spooling directory
/usr/spool/uucppublic.
In the first command, "diff" is on system "hera", the
first source file is on the local system, the second
source file (with a different name) is on system
"hera", and the output is directed to the file "DF"
in the public directory on the local system. In the
second command, "diff" is again on "hera", the first
file is also on "hera", the second file (with a dif-
ferent name) is on "venus", and the output is again
directed to "DF" in the "~uucp" directory.
The following command will not execute properly:
uux "hera!/bin/diff venus!/u/amy/out merlin!/u/amy/out > ~uucp/DF"
This command will not execute because, although the
files are on two different systems, they still have
the same file name.
FLAGS
- Makes the standard input to uux the
standard input to the cmdstring.
-aname Replaces the user ID of the person
issuing the command with user ID speci-
fied with name.
-b Returns standard input to the command if
the exit status is not zero.
-c Transfers the source files to the desti-
nation on the specified system. The
source files are not copied into the
spool directory for transfer. (See the
discussion of the -C flag.) This flag is
on by default.
-C Transfers the source files to the spool
directory. After a set period of time
(specified in the uusched program), the
uucico daemon attempts to transfer the
files to the destination on the specified
computer.
Note: Occasionally, there are problems
in transferring a source file; for
example, the remote computer may not be
working, or the login attempt may fail.
In such cases, the file remains in the
spool directory until it is either trans-
ferred successfully or removed by the
uucleanup command.
-ggrade Specifies when the files are to be trans-
mitted during a particular connection.
Grade is a single number (0-9) or letter
(A-Z, a-z); lower ASCII-sequence charac-
ters cause the files to be transmitted
earlier than do higher sequence charac-
ters. The number 0 is the highest (ear-
liest) grade; z is the lowest (latest).
The default is N.
-j Displays the job identification number of
the process that is running the command
on the specified system. Use this job ID
with the BNU command uustat to check the
status of the command, or with uustat -k
to terminate the process.
-n Prevents user notification by mail
whether or not the command completes suc-
cessfully. The default is to notify the
user if the command fails.
-p Uses the standard input to uux as the
standard input to cmdstring. A - (minus)
has the same effect.
-r Prevents the starting of the spooling
program that transfers files between
systems. The default is to start the
spooling program.
-sfile Reports the status of the transfer in a
file specified by file on the designated
system.
-xdebug_level Displays debugging information on the
screen of the local system. The
debug_level is a number between 0 and 9.
The higher number gives a more detailed
report.
-z Notifies the user only if the command
completes successfully.
EXAMPLES
1. To get the jobid of a job and then compare a file on
the local system "zeus" with a file on a remote
system when the diff command is stored on the local
system, use either of the following formats:
uux -j "/bin/diff /usr/amy/f1 hera!/u/amy/f2 > ~uucp/f1.diff"
or
uux -j /bin/diff /usr/amy/f1 hera!/u/amy/f2 \{~uucp/f1/diff\}
This command gets the file "/usr/amy/f1" from the
remote system "hera", compares it to the file
"/u/amy/f2" on the local system ("zeus"), and places
the output of the command in the local public direc-
tory in a file named "f1.diff". (The full path name
of this file is "/usr/spool/uucppublic/f1.diff".)
Using the -j option produces the output "zeusN52d9".
Note: As shown in the example, the destination name
must be entered either preceded by a > with the whole
command string enclosed in " . . . ", or entered
enclosed in braces and backslashes, as \{ . . . \}.
2. To compare files that are located on two different
remote systems, "hera" and "venus", using the diff
command on the local system:
uux "!/bin/diff hera!/usr/amy/f1 venus!/u/amy/f2 > !f1.diff"
This command gets the "/usr/amy/f1" file from the
system "hera" and the "/u/amy/f2" file from "venus",
runs a diff command on the two files, and places the
results in the file "f1.diff", located in the current
working directory on the local system.
o This output file must be write-enabled. If you
are uncertain about the permission status of a
specific target output file, direct the results
to the public directory, as in the first example.
o The exclamation points representing the local
system are optional.
o Both of the examples above use a > symbol pre-
ceding the name of the output file. When using
the special shell characters >, <, ;, or |,
either quote the entire cmdstring, or quote the
special characters as individual arguments.
3. To specify an output file on a different remote
system:
uux hera!uucp venus!/u/amy/f1 \{merlin!/u/geo/test\}
This command runs uucp on system "hera". The uucp
command then sends the file "/u/amy/f1", stored on
system "venus", to user "geo" on system "merlin" as
"test".
4. To get selected fields from a file on system "hera"
and place them in a file on the local system:
uux "cut -f1 -d: hera\!/etc/passwd > ~uucp/passw.cut"
This command runs cut on the local system, gets the
first field from each line of the password file on
system "hera", and places the output in the file
"passw.cut" in the public directory on the local
system.
Note: In this example, uux is running in a c shell,
so a \ (backslash) must precede the exclamation point
in the name of the remote system.
FILES
/usr/spool/uucp Spooling directory.
/usr/lib/uucp Contains the uucico
daemon.
RELATED INFORMATION
The following commands: "mail, Mail," "uucico,"
"uucp," "uustat," and "uuxqt."