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