BSD 4_1_snap development
[unix-history] / usr / man / man1 / cu.1c
CommitLineData
efdd6d01
C
1.TH CU 1C 4/1/81
2.UC 4
3.SH NAME
4cu \- call UNIX
5.SH SYNOPSIS
6.B cu
7telno
8[
9.B \-t
10]
11[
12.BI \- n
13[
14.B \-s
15speed ]
16[
17.B \-a
18acu ]
19[
20.B \-l
21line ]
22[
23.B \-b
24]
25.SH DESCRIPTION
26.I Cu
27calls up another UNIX system,
28a terminal,
29or possibly a non-UNIX system.
30It manages an interactive conversation with possible
31transfers of text files.
32.I Telno
33is the telephone number,
34with minus signs at appropriate places for delays.
35The
36.BR \-t ""
37flag is used to dial out to a terminal.
38.I Speed
39gives the transmission speed (110, 134, 150, 300, 1200);
40300 is the default value.
41.PP
42The
43.B \-a
44and
45.B \-l
46values may be used to
47specify pathnames
48for the ACU and communications line devices.
49They can be used to override the following
50built-in choices:
51.PP
52.BR \-a " /dev/cua0"
53.BR \-l " /dev/cul0"
54.PP
55The
56.BI \- n
57option, where
58.I n
59is a single digit,
60changes the last character of the ACU and communications line to
61.IR n .
62It is an abbreviation for
63.BI "\-a /dev/cua" n " \-l /dev/cul" n .
64.PP
65After making the connection,
66.I cu
67runs as two processes:
68the
69.I send
70process reads the standard input and
71passes most of it to the remote system;
72the
73.I receive
74process reads from the remote system and passes
75most data to the standard output.
76Lines beginning with `~' have special meanings.
77.PP
78The
79.I send
80process interprets the following:
81.TP 18
82~\|\fB.\|
83terminate the conversation.
84.br
85.ns
86.TP 18
87~EOT
88terminate the conversation
89.TP 18
90~<file
91send the contents of
92.I file
93to the remote system,
94as though typed at the terminal.
95.TP 18
96\~^Z
97suspend the cu process.
98Note that the control-Z must be followed by a newline.
99.TP 18
100\~#
101sends a break.
102.TP 18
103~!
104invoke an interactive shell on the local system.
105.TP 18
106~!cmd ...
107run the command on the local system
108(via
109.BR "sh \-c" ")."
110.TP 18
111~$cmd ...
112run the command locally and send its output
113to the remote system.
114.TP 18
115~%take from [to]
116copy file `from' (on the remote system)
117to file `to' on the local system.
118If `to' is omitted,
119the `from' name is used both places.
120.TP 18
121~%put from [to]
122copy file `from' (on local system)
123to file `to' on remote system.
124If `to' is omitted, the `from' name is used both places.
125.TP 18
126~:
127during an output diversion, this toggles whether the operation of
128.I cu
129will be silent, i.e., whether information received from the foreign
130system will be written to the standard output.
131This allows a ``progress report'' during long transfers.
132.TP 18
133~~\fB\|.\|.\|.\fR
134send
135the line `~\|.\|.\|.'.
136.PP
137Both the
138.I send
139and
140.I receive
141processes handles output diversions of the following form:
142.PP
143\&~>[>][:]file
144.br
145zero or more lines to be written to file
146.br
147\&~>
148.PP
149In any case, output is diverted (or appended, if `>>' used) to the file.
150If `:' is used,
151the diversion is
152.I silent,
153i.e., it is written only to the file.
154If `:' is omitted,
155output is written both to the file and to the standard output.
156The trailing `~>' terminates the diversion.
157.PP
158The use of
159.B ~%put
160requires
161.I stty
162and
163.I cat
164on the remote side.
165It also requires that the
166current erase and kill characters on the remote
167system be identical to the current ones on the local system.
168Backslashes are inserted at appropriate places.
169.PP
170The use of
171.B ~%take
172requires the existence of
173.I echo
174and
175.I tee
176on the remote system.
177Also,
178.B "stty tabs"
179mode is required on the remote system if
180tabs are to be copied without expansion.
181.PP
182Finally, the
183.BR \-b
184flag specifies that nulls are to be turned into breaks.
185This allows the break key (and also control-shift-@) to send a break.
186.SH FILES
187/dev/cua0
188.br
189/dev/cul0
190.br
191/dev/null
192.br
193/usr/spool/uucp/LCK..cu[al][0-7]
194.SH "SEE ALSO"
195rv(4), tty(4)
196.SH DIAGNOSTICS
197Exit code is
198zero for normal exit,
199nonzero (various values) otherwise.
200.SH BUGS
201Only
202.IR mail (1)
203uses syntax anything like the syntax of
204.I cu.