1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
|
.\"
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
.\" permission to reproduce portions of its copyrighted documentation.
.\" Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\"
.\" The Institute of Electrical and Electronics Engineers and The Open
.\" Group, have given us permission to reprint portions of their
.\" documentation.
.\"
.\" In the following statement, the phrase ``this text'' refers to portions
.\" of the system documentation.
.\"
.\" Portions of this text are reprinted and reproduced in electronic form
.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
.\" Standard for Information Technology -- Portable Operating System
.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
.\" Engineers, Inc and The Open Group. In the event of any discrepancy
.\" between these versions and the original IEEE and The Open Group
.\" Standard, the original IEEE and The Open Group Standard is the referee
.\" document. The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\"
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Copyright (c) 1995, Sun Microsystems, Inc. All Rights Reserved.
.\"
.TH UUX 1C "Mar 28, 1995"
.SH NAME
uux \- UNIX-to-UNIX system command execution
.SH SYNOPSIS
.LP
.nf
\fBuux\fR [\fB-\fR] [\fB-bcCjnprz\fR] [\fB-a\fR \fIname\fR] [\fB-g\fR \fIgrade\fR]
[\fB-s\fR \fIfilename\fR] [\fB-x\fR \fIdebug_level\fR] \fIcommand-string\fR
.fi
.SH DESCRIPTION
.sp
.LP
The \fBuux\fR utility will gather zero or more files from various systems,
execute a command on a specified system and then send standard output to a file
on a specified system.
.sp
.LP
\fBNote:\fR For security reasons, most installations limit the list of
commands executable on behalf of an incoming request from \fBuux\fR, permitting
only the receipt of mail (see \fBmail\fR(1)). (Remote execution permissions are
defined in \fB/etc/uucp/Permissions\fR.)
.sp
.LP
The \fIcommand-string\fR is made up of one or more arguments that look like a
shell command line, except that the command and file names may be prefixed by
\fIsystem-name\fR\fB!\fR. A null \fIsystem-name\fR is interpreted as the local
system.
.sp
.LP
File names may be one of the following:
.RS +4
.TP
.ie t \(bu
.el o
An absolute path name.
.RE
.RS +4
.TP
.ie t \(bu
.el o
A path name preceded by \fB~\fR\fIxxx\fR, where \fIxxx\fR is a login name on
the specified system and is replaced by that user's login directory.
.RE
.sp
.LP
Anything else is prefixed by the current directory.
.sp
.LP
As an example, the command:
.sp
.in +2
.nf
example% \fBuux "!diff sys1!/home/dan/filename1 \e
sys2!/a4/dan/filename2 > !~/dan/filename.diff"\fR
.fi
.in -2
.sp
.sp
.LP
will get the \fBfilename1\fR and \fBfilename2\fR files from the \fBsys1\fR and
\fBsys2\fR machines, execute a \fBdiff\fR(1) command and put the results in
\fBfilename.diff\fR in the local \fIPUBDIR\fR\fB/dan/\fR directory.
\fIPUBDIR\fR is a public directory defined in the \fBuucp\fR source. By
default, this directory is \fB/var/spool/uucppublic\fR.
.sp
.LP
Any special shell characters (such as \fB< > ; |\fR) should be quoted either by
quoting the entire \fIcommand-string\fR, or quoting the special characters as
individual arguments. The redirection operators \fB>>\fR, \fB<<\fR, \fB>|\fR,
and \fB>&\fR cannot be used.
.sp
.LP
\fBuux\fR will attempt to get all appropriate files to the specified system
where they will be processed. For files that are output files, the file name
must be escaped using parentheses. For example, the command:
.sp
.in +2
.nf
example% \fBuux "a!cut -f1 b!/usr/filename > c!/usr/filename"\fR
.fi
.in -2
.sp
.sp
.LP
gets \fB/usr/filename\fR from system \fBb\fR and sends it to system \fBa\fR,
performs a \fBcut\fR command on that file and sends the result of the \fBcut\fR
command to system \fBc\fR.
.sp
.LP
\fBuux\fR will notify you if the requested command on the remote system was
disallowed. This notification can be turned off by the \fB-n\fR option. The
response comes by remote mail from the remote machine.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB\(mi\fR\fR
.ad
.RS 18n
The standard input to \fBuux\fR is made the standard input to the
\fIcommand-string\fR.
.RE
.sp
.ne 2
.na
\fB\fB-a\fR \fIname\fR\fR
.ad
.RS 18n
Uses \fIname\fR as the user job identification replacing the initiator user-id.
(Notification will be returned to user-id \fIname\fR.)
.RE
.sp
.ne 2
.na
\fB\fB-b\fR\fR
.ad
.RS 18n
Returns whatever standard input was provided to the \fBuux\fR command if the
exit status is non-zero.
.RE
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 18n
Does not copy local file to the spool directory for transfer to the remote
machine (default).
.RE
.sp
.ne 2
.na
\fB\fB-C\fR\fR
.ad
.RS 18n
Forces the copy of local files to the spool directory for transfer.
.RE
.sp
.ne 2
.na
\fB\fB-g\fR \fIgrade\fR\fR
.ad
.RS 18n
\fIgrade\fR can be either a single letter, number, or a string of alphanumeric
characters defining a service grade. The \fBuuglist\fR(1C) command determines
whether it is appropriate to use the single letter, number, or a string of
alphanumeric characters as a service grade. The output from the \fIuuglist\fR
command will be a list of service grades that are available or a message that
says to use a single letter or number as a grade of service.
.RE
.sp
.ne 2
.na
\fB\fB-j\fR\fR
.ad
.RS 18n
Outputs the jobid string on the standard output which is the job
identification. This job identification can be used by \fBuustat\fR(1C) to
obtain the status or terminate a job.
.RE
.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 18n
Does not notify the user if the command fails.
.RE
.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 18n
Same as \fB\(mi\fR\&. The standard input to \fBuux\fR is made the standard
input to the \fIcommand-string\fR.
.RE
.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.RS 18n
Does not start the file transfer, but just queues the job.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR \fIfilename\fR\fR
.ad
.RS 18n
Reports status of the transfer in \fIfilename\fR. This option is accepted for
compatibility, but it is ignored because it is insecure.
.RE
.sp
.ne 2
.na
\fB\fB-x\fR \fIdebug_level\fR\fR
.ad
.RS 18n
Produces debugging output on the standard output. \fIdebug_level\fR is a number
between 0 and 9. As \fIdebug_level\fR increases to 9, more detailed debugging
information is given.
.RE
.sp
.ne 2
.na
\fB\fB-z\fR\fR
.ad
.RS 18n
Sends success notification to the user.
.RE
.SH ENVIRONMENT VARIABLES
.sp
.LP
See \fBenviron\fR(5) for descriptions of the following environment variables
that affect the execution of \fBuux\fR: \fBLANG\fR, \fBLC_ALL\fR,
\fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred.
.RE
.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/uucp/*\fR\fR
.ad
.RS 25n
other data and programs
.RE
.sp
.ne 2
.na
\fB\fB/etc/uucp/Permissions\fR\fR
.ad
.RS 25n
remote execution permissions
.RE
.sp
.ne 2
.na
\fB\fB/usr/lib/uucp/*\fR\fR
.ad
.RS 25n
other programs
.RE
.sp
.ne 2
.na
\fB\fB/var/spool/uucp\fR\fR
.ad
.RS 25n
spool directories
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Standard
.TE
.SH SEE ALSO
.sp
.LP
\fBcut\fR(1), \fBmail\fR(1), \fBuucp\fR(1C), \fBuuglist\fR(1C),
\fBuustat\fR(1C), \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)
.SH NOTES
.sp
.LP
The execution of commands on remote systems takes place in an execution
directory known to the \fBuucp\fR system.
.sp
.LP
All files required for the execution will be put into this directory unless
they already reside on that machine. Therefore, the simple file name (without
path or machine reference) must be unique within the \fBuux\fR request. The
following command will NOT work:
.sp
.in +2
.nf
example% \fBuux "a!diff b!/home/dan/xyz c!/home/dan/xyz > !xyz.diff"\fR
.fi
.in -2
.sp
.sp
.LP
But the command:
.sp
.in +2
.nf
example% \fBuux "a!diff a!/home/dan/xyz c!/home/dan/xyz > !xyz.diff"\fR
.fi
.in -2
.sp
.sp
.LP
\fIwill\fR work (if \fBdiff\fR is a permitted command.)
.sp
.LP
Protected files and files that are in protected directories that are owned by
the requester can be sent in commands using \fBuux\fR. However, if the
requester is root, and the directory is not searchable by "other", the request
will fail.
.sp
.LP
The following restrictions apply to the shell pipeline processed by \fBuux\fR:
.RS +4
.TP
.ie t \(bu
.el o
In gathering files from different systems, pathname expansion in not performed
by \fBuux\fR. Thus, a request such as
.sp
.in +2
.nf
\fBuux "c89 remsys!~/*.c"\fR
.fi
.in -2
.sp
would attempt to copy the file named literally \fB*.c\fR to the local system.
.RE
.RS +4
.TP
.ie t \(bu
.el o
Only the first command of a shell pipeline may have a \fIsystem-name\fR\fB!\fR.
All other commands are executed on the system of the first command.
.RE
.RS +4
.TP
.ie t \(bu
.el o
The use of the shell metacharacter \fB*\fR will probably not do what you want
it to do.
.RE
.RS +4
.TP
.ie t \(bu
.el o
The shell tokens \fB<<\fR and \fB>>\fR are not implemented.
.RE
.RS +4
.TP
.ie t \(bu
.el o
The redirection operators \fB>>\fR, \fB<<\fR, \fB>|\fR, and \fB>&\fR cannot be
used.
.RE
.RS +4
.TP
.ie t \(bu
.el o
The reserved word \fB!\fR cannot be used at the head of the pipeline to modify
the exit status.
.RE
.RS +4
.TP
.ie t \(bu
.el o
Alias substitution is not performed.
.RE
|