unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Page:
Section:
Apropos / Subsearch:
optional field



uux(1)								       uux(1)



NAME

  uux -	Runs a command on another system

SYNOPSIS

  uux [-c  | -C] [-n  |	-z] [- | -p] [-a user] [-bjr] [-g grade] [-s file]
  [-x debug_level] command_string

  The uux command runs a specified command command_string on a specified sys-
  tem while enabling you to continue working on	the local system. This com-
  mand runs on systems that support the	UUCP protocol.

STANDARDS

  Interfaces documented	on this	reference page conform to industry standards
  as follows:

  uux():  XCU5.0

  Refer	to the standards(5) reference page for more information	about indus-
  try standards	and associated tags.

OPTIONS

  -   Makes the	standard input to uux the standard input to the
      command_string.  Same as -p.

  -a user
      Replaces the user	ID of the person issuing the command with user ID
      user.

  -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 description of the -C option.)

  -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.
      This option is on	by default.

      Occasionally, there are problems in transferring a source	file; for
      example, the remote computer might not be	working, or the	login attempt
      might fail.  In such cases, the file remains in the spool	directory
      until it is either transferred successfully or removed by	the uucleanup
      command.

  -g grade
      Specifies	when the files are to be transmitted during a particular con-
      nection.	The variable grade is a	single number (0-9) or ASCII 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 number	with the
      uustat command to	check the status of the	command, or with uustat	-k to
      terminate	the process.

  -n  Prevents user notification by mailx of whether the command executed
      successfully.  The default is to notify you if the command fails.

  -p  Uses the standard	input to uux as	the standard input to command_string.
      A	- (dash) 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.

  -s file
      Reports the status of the	transfer in a file specified by	file on	the
      designated system.

  -x debug_level
      Displays debugging information on	the screen of the user's terminal.
      The debug_level is a number between 0 and	9.  The	higher number gives a
      more detailed report.

  -z  Notifies you if the command executed successfully	on the specified sys-
      tem.  In that case, you are notified about the failure through the mail
      system.

DESCRIPTION

  The command gathers various files from the designated	systems, if neces-
  sary.	 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. (For security	reasons, many installations permit uux to run only
  the rmail command.)

  The uux command creates execute (X.*)	files that run 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	exe-
  cutions.

  The full pathname of an execute file is a form of the	following:

  /usr/spool/uucp/system/X.systemNxxxx

  After	creating the files in the spooling directory, uux calls	the uucico
  daemon, to transfer the files	from the spooling directory on the local sys-
  tem to the designated	remote system.	Once the files are transferred,	the
  uuxqt	daemon executes	the command_string on the specified system, placing
  any output from the command in a designated file on a	specified system.

  The command_string variable is made up of one	or more	arguments that look
  like a command line, except that command_string might	be prefixed by sys-
  tem!.	 The default system is the local system.

  Unless the -n	option is specified, uux notifies you if the remote system
  does not run the command.  This response comes by mailx from the remote
  system.







  Filenames, Pathnames,	and System Names


  When specifying the destination of the output	of a command, you can enter
  uux in either	of the following formats:

    +  uux [option ...]	command_string > destination

    +  uux [option ...]	command_string \{destination\}

  Destination names can	be either of the following:

    +  A full pathname.

    +  A full pathname preceded	by ~user, where	user is	a login	name on	the
       specified system.  The uux command replaces this	pathname with your
       login directory.

  The shell pattern-matching characters	?, *, and [...]	can be used in the
  pathname of a	source file (such as files compared by the diff	command); the
  appropriate system expands them.

  Shell	pattern-matching characters should not be used in the destination
  pathname.

  Place	either two \ (backslashes) or a	pair of	" " (double quotes) around
  pattern-matching characters in a pathname so the local shell cannot inter-
  pret them before uux sends the command to a designated system. If using the
  special shell	characters >&gt;, <&lt;, ;, or | in a pathname,	precede	each special
  character with \ or place "..." around the entire command string. Do not
  use the shell	redirection characters <&lt;<&lt; or >&gt;>&gt;	in a pathname.

  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.

  When specifying a system, always place it before the command_string in the
  entry. System	names must contain only	ASCII characters.

  The !	(exclamation point) preceding the name of the local system in a	com-
  mand 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 pathname	on the remote systems.

  The exclamation point	representing a remote system 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.

  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 be executed, but	will not produce the desired results.

  The following	two commands will be executed:

       uux "nhk!/usr/bin/diff /usr/amy/out1 nhk!/u/amy/out > ~uucp/DF"

       uux "nhk!/usr/bin/diff nhk!/usr/amy/out1	&!/u/amy/out > ~uucp/DF"

  (The notation	~uucp is the shorthand way of specifying the public spooling
  directory /usr/spool/uucppublic.) In the first command, diff is on system
  nhk, the first source	file is	on the local system, the second	source file
  (with	a different name) is on	system nhk, and	the output is directed to the
  file DF in the public	directory on the local system.	In the second com-
  mand,	diff is	again on nhk, the first	file is	also on	nhk, the second	file
  (with	a different name) is on	&&amp;, and the output is again directed to DF in
  the ~uucp directory.

  The following	command	will not be executed properly:

       uux "nhk!/usr/bin/diff &!/u/amy/out merl!/u/amy/out > ~uucp/DF"

  This command will not	be executed because, although the files	are on two
  different systems, they still	have the same filename.

EXAMPLES

   1.  To run the lp command on	a remote system, enter:
	    uux	merl!lp	/reports/memos/lance

       In this example,	the file /reports/memos/lance is printed on the
       remote system merl.  Unless the -n option or the	-z option is speci-
       fied, the uux command notifies you if the remote	system fails to	run
       the command.  The response comes	by the mailx command from the remote
       system.

   2.  To run commands on two remote systems, enter the	information on
       separate	command	lines, enter:
	    uux	merl!print /reports/memos/lance
	    uux	zeus!print /test/examples/examp1

       In this example,	the file /reports/memos/lance is printed on the
       remote system merl, and the file	/test/examples/examp1 is printed on
       the remote system zeus.

   3.  To get the job_number 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 "/usr/bin/diff /usr/amy/f1 nhk!/u/amy/f2 >&gt; ~uucp/f1.diff"

       or
	    uux	-j /usr/bin/diff /usr/amy/f1 nhk!/u/amy/f2 \{~uucp/f1/diff\}

       This command gets the file /usr/amy/f1 from the remote system nhk,
       compares	it to the file /u/amy/f2 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 pathname of this file is
       /usr/spool/uucppublic/f1.diff.)	Using the -j option produces the out-
       put zeusN52d9.

       As shown	in the example,	the destination	name must be entered in	one
       of two ways:

	 +  Preceded by	a >&gt; (redirection symbol) with the whole	command
	    string enclosed in "..." (double quotes)

	 +  Enclosed in	braces and backslashes,	as \{...\}

   4.  To compare files	that are located on two	different remote systems, nhk
       and &&amp;, using the	diff command on	the local system, enter:
	    uux	"!/usr/bin/diff	nhk!/usr/amy/f1	&&amp;!/u/amy/f2 >&gt; !f1.diff"

       This command gets the file /usr/amy/f1 from the system nhk and the
       file /u/amy/f2 from &&amp;,  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.

       Additional points:

	 +  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.

	 +  The	exclamation points representing	the local system are
	    optional.

	 +  Both of the	examples above use a >&gt; (redirection symbol) preceding
	    the	name of	the output file.  When using the special shell char-
	    acters >&gt;, <&lt;, ;, or |, either quote the entire command_string, or
	    quote the special characters as individual arguments.

   5.  To specify an output file on a different	remote system, enter:
	    uux	nhk!uucp &&amp;!/u/amy/f1 \{merl!/u/geo/test\}

       This command runs uucp on the remote system nhk.	 The uucp command
       then sends the file /u/amy/f1, stored on	system &&amp;, to user geo on sys-
       tem merl	as test.

   6.  To get selected fields from a file on remote system nhk and place them
       in a file on the	local system, enter:
	    uux	"cut -f1 -d: nhk\!/etc/passwd >&gt;	~uucp/passw.cut"

       This command runs cut on	the local system, gets the first field from
       each line of the	password file on system	nhk, and places	the output in
       the file	passw.cut in the public	directory on the local system.

       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.

ENVIRONMENT VARIABLES

  The following	environment variables affect the execution of uux:

  FLWCTL
      [Tru64 UNIX]  Specifies the flow control used on the connection.	Per-
      mitted values are: HW (hardware),	SW (software), HSW (hardware and
      software), and NONE. The uugetty on the remote system must also use the
      same flow	control.

  LANG
      Provides a default value for the internationalization variables that
      are unset	or null. If LANG is unset or null, the corresponding value
      from the default locale is used.	If any of the internationalization
      variables	contains an invalid setting, the utility behaves as if none
      of the variables had been	defined.

  LC_ALL
      If set to	a non-empty string value, overrides the	values of all the
      other internationalization variables.

  LC_CTYPE
      Determines the locale for	the interpretation of sequences	of bytes of
      text data	as characters (for example, single-byte	as opposed to multi-
      byte characters in arguments and input files).

  LC_MESSAGES
      Determines the locale that should	be used	to affect the format and con-
      tents of diagnostic messages written to standard error.

  NLSPATH
      Determines the location of message catalogues for	the processing of
      LC_MESSAGES.

  UUTIMEOUT
      [Tru64 UNIX]  Specifies the amount of time (in seconds) for uucico to
      try to establish a connection before it times out.  A value of 0 (zero)
      indicates	an unlimited amount of time.

FILES

  /usr/spool/uucp
      Spooling directory.

  /usr/lib/uucp
      Contains the uucico daemon.

  /usr/spool/uucppublic
      Public directory.

SEE ALSO

  Commands:  ct(1), cu(1), mailx(1), rmail(1), sendmail(8), tip(1),
  uucico(8), uucleanup(8), uucp(1), uuencode(1), uulog(1), uuname(1),
  uupick(1), uusched(8), uusend(1), uustat(1), uuto(1)

  Standards:  standards(5)