forked from quinot/taylor-uucp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cu.1
304 lines (294 loc) · 7.47 KB
/
cu.1
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
''' $Id$
.TH cu 1 "Taylor UUCP 1.07"
.SH NAME
cu \- Call up another system
.SH SYNOPSIS
.B cu
[ options ] [ system | phone | "dir" ]
.SH DESCRIPTION
The
.I cu
command is used to call up another system and act as a dial in
terminal. It can also do simple file transfers with no error
checking.
.I cu
takes a single argument, besides the options. If the argument is the
string "dir" cu will make a direct connection to the port. This may
only be used by users with write access to the port, as it permits
reprogramming the modem.
Otherwise, if the argument begins with a digit, it is taken to be a
phone number to call. Otherwise, it is taken to be the name of a
system to call. The
.B \-z
or
.B \-\-system
option may be used to name a system beginning with a digit, and the
.B \-c
or
.B \-\-phone
option may be used to name a phone number that does not begin with a
digit.
.I cu
locates a port to use in the UUCP configuration files. If a simple
system name is given, it will select a port appropriate for that
system. The
.B \-p, \-\-port, \-l, \-\-line, \-s
and
.B \-\-speed
options may be used to control the port selection.
When a connection is made to the remote system,
.I cu
forks into two processes. One reads from the port and writes to the
terminal, while the other reads from the terminal and writes to the
port.
.I cu
provides several commands that may be used during the conversation.
The commands all begin with an escape character, initially
.B ~
(tilde). The escape character is only recognized at the beginning of
a line. To send an escape character to the remote system at the start
of a line, it must be entered twice. All commands are either a single
character or a word beginning with
.B %
(percent sign).
.I cu
recognizes the following commands:
.TP 5
.B ~.
Terminate the conversation.
.TP 5
.B ~! command
Run command in a shell. If command is empty, starts up a shell.
.TP 5
.B ~$ command
Run command, sending the standard output to the remote system.
.TP 5
.B ~| command
Run command, taking the standard input from the remote system.
.TP 5
.B ~+ command
Run command, taking the standard input from the remote system and
sending the standard output to the remote system.
.TP 5
.B ~#, ~%break
Send a break signal, if possible.
.TP 5
.B ~c directory, ~%cd directory
Change the local directory.
.TP 5
.B ~> file
Send a file to the remote system. This just dumps the file over the
communication line. It is assumed that the remote system is expecting
it.
.TP 5
.B ~<
Receive a file from the remote system. This prompts for the local
file name and for the remote command to execute to begin the file
transfer. It continues accepting data until the contents of the
.B eofread
variable are seen.
.TP 5
.B ~p from to, ~%put from to
Send a file to a remote Unix system. This runs the appropriate
commands on the remote system.
.TP 5
.B ~t from to, ~%take from to
Retrieve a file from a remote Unix system. This runs the appropriate
commands on the remote system.
.TP 5
.B ~s variable value
Set a
.I cu
variable to the given value. If value is not given, the variable is
set to
.B true.
.TP 5
.B ~! variable
Set a
.I cu
variable to
.B false.
.TP 5
.B ~z
Suspend the cu session. This is only supported on some systems. On
systems for which ^Z may be used to suspend a job,
.B ~^Z
will also suspend the session.
.TP 5
.B ~%nostop
Turn off XON/XOFF handling.
.TP 5
.B ~%stop
Turn on XON/XOFF handling.
.TP 5
.B ~v
List all the variables and their values.
.TP 5
.B ~?
List all commands.
.I cu
also supports several variables. They may be listed with the
.B ~v
command, and set with the
.B ~s
or
.B ~!
commands.
.TP 5
.B escape
The escape character. Initially
.B ~
(tilde).
.TP 5
.B delay
If this variable is true,
.I cu
will delay for a second after recognizing the escape character before
printing the name of the local system. The default is true.
.TP 5
.B eol
The list of characters which are considered to finish a line. The
escape character is only recognized after one of these is seen. The
default is carriage return, ^U, ^C, ^O, ^D, ^S, ^Q, ^R.
.TP 5
.B binary
Whether to transfer binary data when sending a file. If this is
false, then newlines in the file being sent are converted to carriage
returns. The default is false.
.TP 5
.B binary-prefix
A string used before sending a binary character in a file transfer, if
the
.B binary
variable is true. The default is ^V.
.TP 5
.B echo-check
Whether to check file transfers by examining what the remote system
echoes back. This probably doesn't work very well. The default is
false.
.TP 5
.B echonl
The character to look for after sending each line in a file. The
default is carriage return.
.TP 5
.B timeout
The timeout to use, in seconds, when looking for a character, either
when doing echo checking or when looking for the
.B echonl
character. The default is 30.
.TP 5
.B kill
The character to use delete a line if the echo check fails. The
default is ^U.
.TP 5
.B resend
The number of times to resend a line if the echo check continues to
fail. The default is 10.
.TP 5
.B eofwrite
The string to write after sending a file with the
.B ~>
command. The default is ^D.
.TP 5
.B eofread
The string to look for when receiving a file with the
.B ~<
command. The default is $, which is intended to be a typical shell
prompt.
.TP 5
.B verbose
Whether to print accumulated information during a file transfer. The
default is true.
.SH OPTIONS
The following options may be given to
.I cu.
.TP 5
.B \-e, \-\-parity=even
Use even parity.
.TP 5
.B \-o, \-\-parity=odd
Use odd parity.
.TP 5
.B \-\-parity=none
Use no parity. No parity is also used if both
.B \-e
and
.B \-o
are given.
.TP 5
.B \-h, \-\-halfduplex
Echo characters locally (half-duplex mode).
.TP 5
.B \-\-nostop
Turn off XON/XOFF handling (it is on by default).
.TP 5
.B \-E char, \-\-escape char
Set the escape character. Initially
.B ~
(tilde). To eliminate the escape character, use
.B -E ''.
.TP 5
.B \-z system, \-\-system system
The system to call.
.TP 5
.B \-c phone-number, \-\-phone phone-number
The phone number to call.
.TP 5
.B \-p port, \-\-port port
Name the port to use.
.TP 5
.B \-a port
Equivalent to
.B \-\-port port.
.TP 5
.B \-l line, \-\-line line
Name the line to use by giving a device name. This may be used to
dial out on ports that are not listed in the UUCP configuration files.
Write access to the device is required.
.TP 5
.B \-s speed, \-\-speed speed
The speed (baud rate) to use.
.TP 5
.B \-#
Where # is a number, equivalent to
.B \-\-speed #.
.TP 5
.B \-n, \-\-prompt
Prompt for the phone number to use.
.TP 5
.B \-d
Enter debugging mode. Equivalent to
.B \-\-debug all.
.TP 5
.B \-x type, \-\-debug type
Turn on particular debugging types. The following types are
recognized: abnormal, chat, handshake, uucp-proto, proto, port,
config, spooldir, execute, incoming, outgoing. Only abnormal, chat,
handshake, port, config, incoming and outgoing are meaningful for
.I cu.
Multiple types may be given, separated by commas, and the
.B \-\-debug
option may appear multiple times. A number may also be given, which
will turn on that many types from the foregoing list; for example,
.B \-\-debug 2
is equivalent to
.B \-\-debug abnormal,chat.
.B \-\-debug all
may be used to turn on all debugging options.
.TP 5
.B \-I file, \-\-config file
Set configuration file to use. This option may not be available,
depending upon how
.I cu
was compiled.
.TP 5
.B \-v, \-\-version
Report version information and exit.
.TP 5
.B \-\-help
Print a help message and exit.
.SH BUGS
This program does not work very well.
.SH AUTHOR
Ian Lance Taylor