📄 uux.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>uux</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_2771"> </a>NAME</h4><blockquote>uux - remote command execution</blockquote><h4><a name = "tag_001_014_2772"> </a>SYNOPSIS</h4><blockquote><pre><code>uux <b>[</b>-np<b>]</b><i> command-string</i>uux <b>[</b>-jnp<b>]</b><i> command-string</i>uux <b>[</b>-<b>][</b>-jn<b>]</b><i> command-string</i></code></pre></blockquote><h4><a name = "tag_001_014_2773"> </a>DESCRIPTION</h4><blockquote>The<i>uux</i>utilitywill gather zero or more files from various systems, execute ashell pipeline (see<xref href=shcmds><a href="chap2.html#tag_001_009">Shell Commands</a></xref>)on a specified system,and then send the standard output of the commandto a file on a specified system.Only the first command of a pipeline can have a"<i>system-name</i>!"prefix.All other commands in the pipelineare executed on the system of the first command.<p>The following restrictions are applicableto the shell pipeline processed by<i>uux</i>:<ul><p><li>In gathering files from different systems,pathname expansion is not performed by<i>uux</i>.Thus, a request such as:<pre><code>uux "c89 remsys!~/*.c"</code></pre>would attempt to copy the file named literally <b>*.c</b> to the local system.<p><li>The redirection operators<b>>></b>,<b><<</b>,<b>>|</b>and<b>>&</b>cannot be used.<p><li>The reserved word<b>!</b>cannot be used at the head ofthe pipeline to modify the exit status.<p><li>Alias substitution is not performed.<p></ul><p>A filename can be specified as for<i><a href="uucp.html">uucp</a></i>;it can be an absolute pathname, a pathname preceded by<i>~name</i>(which is replaced by the correspondinglogin directory), a pathname specified as<i>~/dest</i>(<i>dest</i>)is prefixed bythe public directory called<i>"PUBDIR"</i>;the actual location of<i>PUBDIR</i>is implementation-dependent),or a simple filename (which is prefixed by<i>uux</i>with the current directory).See<i><a href="uucp.html">uucp</a></i>for the details.<p>The execution of commands on remote systems takes place in anexecution directory known to the<i><a href="uucp.html">uucp</a></i>system.All files required for the execution will be put into thisdirectory unless they already reside on that machine.Therefore, the non-local filenames (without path or machinereference) must be unique within the<i>uux</i>request.<p>The<i>uux</i>utility will attempt to get all files to the execution system.For files that are output files, the filename must be escaped usingparentheses.<p>The remote system will notify the user by mailif the requested command on the remotesystem was disallowed or the files were not accessible.This notification can be turned off by the<b>-n</b>option.<p>Typical implementations of this utility require a communicationsline configured to use the <b>XBD</b> specification, <a href="../xbd/termios.html"><b>General Terminal Interface</b> </a> ,but other communications means may be used.On systems where there are no available communications means(either temporarily or permanently), thisutility will write an error message describing the problemand exit with a non-zero exit status.<p>The<i>uux</i>utility cannot guarantee support for all character encodingsin all circumstances.For example,transmission data may be restricted to 7-bits by the underlyingnetwork, 8-bit data and filenames need not be portable tonon-internationalised systems, and so on.Under these circumstances, it is recommended that onlycharacters defined in theISO/IEC 646:1991 standard International Reference Version(equivalent to ASCII) 7-bit range ofcharacters be used and that only characters defined in the PortableFilename Character Set be used for naming files.</blockquote><h4><a name = "tag_001_014_2774"> </a>OPTIONS</h4><blockquote>The<i>uux</i>utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b> </a> ,except that - is supported as an optionin the obsolescent version,rather than an operand.The following options are supported:<dl compact><dt><b>-p</b><dd><dt><b>-</b><dd>Make the standard input to<i>uux</i>the standard input to the<i>command-string</i>.<dt><b>-j</b><dd>Write the job identificationstring to standard output.This job identification can be used by<i><a href="uustat.html">uustat</a></i>to obtain the status or terminate a job.<dt><b>-n</b><dd>Do not notify the user if the command fails.</dl></blockquote><h4><a name = "tag_001_014_2775"> </a>OPERANDS</h4><blockquote>The following operands are supported:<dl compact><dt><i>command-string</i><dd>A string made up of one or more arguments thatare similar to normal command arguments,except that the command and any filenamescan be prefixed by"<i>system-name</i>!"A null<i>system-name</i>is interpreted as the local system.</dl></blockquote><h4><a name = "tag_001_014_2776"> </a>STDIN</h4><blockquote>The standard input is not used unless the- or<b>-p</b>option is specified; in those cases, thestandard input is made the standard input of the<i>command-string</i>.</blockquote><h4><a name = "tag_001_014_2777"> </a>INPUT FILES</h4><blockquote>Input files are selected according to the contents of<i>command-string</i>.</blockquote><h4><a name = "tag_001_014_2778"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>uux</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_2779"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2780"> </a>STDOUT</h4><blockquote>The standard output is not used unless the<b>-j</b>option is specified; in that case, the jobidentification string is written to standardoutput in the following format:<p><code><tt>"%s\n"</tt>, <<i>jobid</i>></code></blockquote><h4><a name = "tag_001_014_2781"> </a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_2782"> </a>OUTPUT FILES</h4><blockquote>Output files are created or written, or both, according to the contents of<i>command-string</i>.<p>If the<b>-n</b>is not used, mail files will be modifiedfollowing any command or file-access failureson the remote system.</blockquote><h4><a name = "tag_001_014_2783"> </a>EXTENDED DESCRIPTION</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_2784"> </a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>>0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_2785"> </a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_2786"> </a>APPLICATION USAGE</h4><blockquote>Note that, for security reasons, many installations willlimit the list ofcommands executable on behalf of an incoming request from<i>uux</i>.Many sites will permit little more thanthe receipt of mail via<i>uux</i>.<p>Any characters special to the command interpreter should be quoted eitherby quoting the entire<i>command-string</i>or quoting the special characters as individual arguments.<p>As noted in<i><a href="uucp.html">uucp</a></i>,shell pattern matching notationcharacters appearing in pathnames are expanded on theappropriate local system.This is done under the control of local settings of<i>LC_COLLATE</i>and<i>LC_CTYPE .</i>Thus, care should be taken when using bracketedfilename patterns, as collation and typing rules may vary from onesystem to another.Also be aware that certain types of expression(that is, equivalence classes, character classes and collatingsymbols) need not be supported on non-internationalised systems.</blockquote><h4><a name = "tag_001_014_2787"> </a>EXAMPLES</h4><blockquote><ol><p><li>The following command gets<i>file1</i>from system<b>a</b>and<i>file2</i>file from system<b>b</b>,executes<i><a href="diff.html">diff</a></i>on the local system,and puts the results in<b>file.diff</b>in the local<i>PUBDIR</i>directory.(<i>PUBDIR</i>is the<i><a href="uucp.html">uucp</a></i>public directory on the local system.)<pre><code>uux "!diff a!/usr/file1 b!/a4/file2 >!~/file.diff"</code></pre><p><li>The following command will fail because<i>uux</i>places all files copied to a systemin the same working directory.Although the files<b>xyz</b>are from two different systems, their filenames are the sameand will conflict.<pre><code>uux "!diff a!/usr1/xyz b!/usr2/xyz >!~/xyz.diff"</code></pre><p><li>The following command will succeed (assuming<i><a href="diff.html">diff</a></i>is permitted on system<b>a</b>)because the file local to system<b>a</b>is not copied to theworking directory, and hence does not conflict the filefrom system<b>c</b>.<pre><code>uux "a!diff a!/usr/xyz c!/usr/xyz >!~/xyz.diff"</code></pre><p></ol></blockquote><h4><a name = "tag_001_014_2788"> </a>FUTURE DIRECTIONS</h4><blockquote>A version of<i>uux</i>that fully supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b> </a> may beintroduced in a future issue.</blockquote><h4><a name = "tag_001_014_2789"> </a>SEE ALSO</h4><blockquote><i><a href="uucp.html">uucp</a></i>,<i><a href="uuencode.html">uuencode</a></i>,<i><a href="uustat.html">uustat</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -