Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uux(1c) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mail, Mail

uucico

uucp

uustat

uuxqt



UUX(1c,C)                   AIX Commands Reference                    UUX(1c,C)



-------------------------------------------------------------------------------
uux



PURPOSE

Runs a command on another AIX or UNIX system.

SYNTAX


       +-- -c --+  +--------+   +-----------------------------+
uux ---| one of |--| one of |---| +-------------------------+ |-- cmdstring --|
       | +----+ |  | +----+ |   +-| -        -p             |-+
       +-| -c |-+  +-| -n |-+    ^| -a name  -r             ||
         | -C |      | -z |      || -b       -s file        ||
         +----+      +----+      || -g grade -x debug-level ||
                                 || -j                      ||
                                 |+-------------------------+|
                                 +---------------------------+


Note:  This command does not have MBCS support.

DESCRIPTION

The Basic Networking Utilities (BNU) command uux runs a specified AIX command
on a specified AIX or Unix 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
execution, 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




Processed November 8, 1990         UUX(1c,C)                                  1





UUX(1c,C)                   AIX Commands Reference                    UUX(1c,C)



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 following 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 "source" 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 designated 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.





Processed November 8, 1990         UUX(1c,C)                                  2





UUX(1c,C)                   AIX Commands Reference                    UUX(1c,C)



  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 executes, but does not produce the desired results.

    The following two commands do 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 different
    name) is on "venus", and the output is again directed to "DF" in the
    "~uucp" directory.

    The following command does not execute properly:

      uux "hera!/bin/diff venus!/u/amy/out merlin!/u/amy/out > ~uucp/DF"

    This command does 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 specified with name.




Processed November 8, 1990         UUX(1c,C)                                  3





UUX(1c,C)                   AIX Commands Reference                    UUX(1c,C)



-b               Returns standard input to the command if the exit status is
                 not zero.

-c               Transfers the source files to the destination 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 transferred successfully or removed by the
                        uucleanup command.

-ggrade          Specifies when the files are to be transmitted during a
                 particular connection.  Grade is a single number (0-9) or
                 letter (A-Z, a-z); lower ASCII-sequence characters cause the
                 files to be transmitted earlier than do higher sequence
                 characters.  The number 0 is the highest (earliest) 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 successfully.  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.




Processed November 8, 1990         UUX(1c,C)                                  4





UUX(1c,C)                   AIX Commands Reference                    UUX(1c,C)



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 "/u/amy/f2" from the remote system "hera",
    compares it to the file "/usr/amy/f1" on the local system ("zeus"), and
    places the output of the command in the local public directory 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 preceding 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".




Processed November 8, 1990         UUX(1c,C)                                  5





UUX(1c,C)                   AIX Commands Reference                    UUX(1c,C)



  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

See the following commands:  "mail, Mail,"  "uucico,"  "uucp," "uustat," and
"uuxqt."

See the chapter on basic networking utilities in Managing the AIX Operating
System.































Processed November 8, 1990         UUX(1c,C)                                  6



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026