remove-rx-2tier-freepacketq-20050403
[openafs.git] / src / rsh / rsh.1
1 .\" Copyright (c) 1983 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms are permitted
5 .\" provided that the above copyright notice and this paragraph are
6 .\" duplicated in all such forms and that any documentation,
7 .\" advertising materials, and other materials related to such
8 .\" distribution and use acknowledge that the software was developed
9 .\" by the University of California, Berkeley.  The name of the
10 .\" University may not be used to endorse or promote products derived
11 .\" from this software without specific prior written permission.
12 .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13 .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14 .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15 .\"
16 .\"     @(#)rsh.1       6.2 (Berkeley) 9/20/88
17 .\"
18 .TH RSH 1 "September 20, 1988"
19 .UC 5
20 .SH NAME
21 rsh \- remote shell
22 .SH SYNOPSIS
23 .B rsh
24 host
25 [
26 .B \-l
27 username
28 ] [
29 .B \-n
30 ] command
31 .br
32 host
33 [
34 .B \-l
35 username
36 ] [
37 .B \-n
38 ] command
39 .SH DESCRIPTION
40 .I Rsh
41 connects to the specified
42 .I host,
43 and executes the specified \fIcommand\fR.
44 .I Rsh
45 copies its standard input to the remote command, the standard
46 output of the remote command to its standard output, and the
47 standard error of the remote command to its standard error.
48 Interrupt, quit and terminate signals are propagated to the remote
49 command; \fIrsh\fP normally terminates when the remote command does.
50 .PP
51 The remote username used is the same as your local username,
52 unless you specify a different remote name with the
53 .B \-l
54 option.
55 This remote name must be equivalent (in the sense of
56 .IR rlogin (1C))
57 to the originating account; no provision
58 is made for specifying a password with a command.
59 .PP
60 If you omit
61 .I command,
62 then instead of executing a single command, you will be logged in
63 on the remote host using
64 .IR rlogin (1C).
65 .PP
66 Shell metacharacters which are not quoted are interpreted
67 on local machine, while quoted metacharacters are interpreted on
68 the remote machine.
69 Thus the command
70 .PP
71 \ \ \ rsh otherhost cat remotefile >> localfile
72 .PP
73 appends the remote file
74 .I remotefile
75 to the localfile
76 .I localfile,
77 while
78 .PP
79 \ \ \ rsh otherhost cat remotefile ">>" otherremotefile
80 .PP
81 appends
82 .I remotefile
83 to
84 .I otherremotefile.
85 .PP
86 Host names are given in the file /etc/hosts.  Each host
87 has one standard name (the first name given in the file), which
88 is rather long and unambiguous, and optionally one or more nicknames.
89 The host names for local machines are also commands in the directory
90 /usr/hosts; if you put this directory in your search path
91 then the
92 .B rsh
93 can be omitted.
94 .SH FILES
95 .ta 2i
96 /etc/hosts
97 .br
98 /usr/hosts/*
99 .DT
100 .SH SEE ALSO
101 rlogin(1)
102 .SH BUGS
103 If you are using
104 .IR csh (1)
105 and put a
106 .IR rsh (1)
107 in the background without redirecting its input
108 away from the terminal, it will block even if no reads
109 are posted by the remote command.  If no input is desired
110 you should redirect the input of
111 .I rsh
112 to /dev/null using the
113 .B \-n
114 option.
115 .PP
116 You cannot run an interactive command
117 (like
118 .IR rogue (6)
119 or
120 .IR vi (1));
121 use
122 .IR rlogin (1).
123 .PP
124 Stop signals stop the local \fIrsh\fP process only; this is arguably
125 wrong, but currently hard to fix for reasons too complicated to
126 explain here.