display next file name as part of "END" prompt
[unix-history] / usr / src / usr.bin / rsh / rsh.1
CommitLineData
a9c6ea3c
KB
1.\" Copyright (c) 1983 The Regents of the University of California.
2.\" All rights reserved.
1fa17096 3.\"
a9c6ea3c
KB
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.
1fa17096 15.\"
d4e1bbc0 16.\" @(#)rsh.1 6.3 (Berkeley) %G%
a9c6ea3c
KB
17.\"
18.TH RSH 1 ""
1fa17096
KM
19.UC 5
20.SH NAME
21rsh \- remote shell
22.SH SYNOPSIS
23.B rsh
24host
25[
26.B \-l
27username
28] [
29.B \-n
30] command
31.br
32host
33[
34.B \-l
35username
36] [
37.B \-n
38] command
39.SH DESCRIPTION
40.I Rsh
41connects to the specified
42.I host,
43and executes the specified \fIcommand\fR.
44.I Rsh
45copies its standard input to the remote command, the standard
46output of the remote command to its standard output, and the
47standard error of the remote command to its standard error.
48Interrupt, quit and terminate signals are propagated to the remote
49command; \fIrsh\fP normally terminates when the remote command does.
50.PP
51The remote username used is the same as your local username,
52unless you specify a different remote name with the
53.B \-l
54option.
55This remote name must be equivalent (in the sense of
d4e1bbc0 56.IR rlogin (1))
1fa17096
KM
57to the originating account; no provision
58is made for specifying a password with a command.
59.PP
60If you omit
61.I command,
62then instead of executing a single command, you will be logged in
63on the remote host using
d4e1bbc0 64.IR rlogin (1).
1fa17096
KM
65.PP
66Shell metacharacters which are not quoted are interpreted
67on local machine, while quoted metacharacters are interpreted on
68the remote machine.
69Thus the command
70.PP
71\ \ \ rsh otherhost cat remotefile >> localfile
72.PP
73appends the remote file
74.I remotefile
75to the localfile
76.I localfile,
77while
78.PP
79\ \ \ rsh otherhost cat remotefile ">>" otherremotefile
80.PP
81appends
82.I remotefile
83to
84.I otherremotefile.
85.PP
86Host names are given in the file /etc/hosts. Each host
87has one standard name (the first name given in the file), which
88is rather long and unambiguous, and optionally one or more nicknames.
89The host names for local machines are also commands in the directory
90/usr/hosts; if you put this directory in your search path
91then the
92.B rsh
93can be omitted.
94.SH FILES
95.ta 2i
96/etc/hosts
97.br
98/usr/hosts/*
99.DT
100.SH SEE ALSO
a9c6ea3c 101rlogin(1)
1fa17096
KM
102.SH BUGS
103If you are using
104.IR csh (1)
105and put a
a9c6ea3c 106.IR rsh (1)
1fa17096
KM
107in the background without redirecting its input
108away from the terminal, it will block even if no reads
109are posted by the remote command. If no input is desired
110you should redirect the input of
111.I rsh
112to /dev/null using the
113.B \-n
114option.
115.PP
116You cannot run an interactive command
117(like
118.IR rogue (6)
119or
120.IR vi (1));
121use
a9c6ea3c 122.IR rlogin (1).
1fa17096
KM
123.PP
124Stop signals stop the local \fIrsh\fP process only; this is arguably
125wrong, but currently hard to fix for reasons too complicated to
126explain here.