CU(1) | MidnightBSD General Commands Manual | CU(1) |
cu
— call
UNIX
cu |
[-ehot ] [-a
acu] [-l
line] [-s
speed |
- speed]
[phone-number] |
The cu
utility establishes a full-duplex
connection to another machine, giving the appearance of being logged in
directly on the remote CPU. It goes without saying that you must have a
login on the machine (or equivalent) to which you wish to connect.
The options are as follows:
-a
acu-e
-e
and
-o
are given, then no parity is used (the
default).-h
-l
line-o
-e
and
-o
are given, then no parity is used (the
default).-s
speed |
-
speed-t
Typed characters are normally transmitted directly to the remote
machine (which does the echoing as well). A tilde
(‘~
’) appearing as the first character
of a line is an escape signal; the following are recognized:
~^D
or ~.
~c
[name]~!
cu
).~>
cu
utility
prompts for the name of a local file to transmit.~<
cu
utility
prompts first for the name of the file to be sent, then for a command to
be executed on the remote machine.~p
from [to]stty -echo; cat > 'to'; stty
echo
If the to file is not specified, the
from file name is used. This command is actually a
UNIX specific version of the
~>
command.
~t
from [to]~p
command, the to file
defaults to the from file name if it is not
specified. The remote host executes the following command string to send
the file to cu
:
cat 'from'; echo '' | tr '\012'
'\01'
~|
~$
~C
0 <-> remote tty in 1 <-> remote tty out 2 <-> local tty stderr
~#
BREAK
to the remote system. For systems
which do not support the necessary
ioctl
()
call, the break is simulated by a sequence of line speed changes and
DEL
characters.~s
~v
~^Z
cu
(only available with job control).~^Y
cu
(only available with job control); the “remote side” of
cu
, the side that displays output from the remote
host, is left running.~?
When cu
prompts for an argument, for
example during setup of a file transfer, the line typed may be edited with
the standard erase and kill characters. A null line in response to a prompt,
or an interrupt, will abort the dialogue and return the user to the remote
machine.
The cu
utility guards against multiple
users connecting to a remote system by opening modems and terminal lines
with exclusive access, and by honoring the locking protocol used by
uucico(8)
(ports/net/freebsd-uucp).
During file transfers cu
provides a
running count of the number of lines transferred. When using the
~>
and ~<
commands,
the eofread and eofwrite
variables are used to recognize end-of-file when reading, and specify
end-of-file when writing (see below). File transfers normally depend on
hardwareflow or tandem mode for flow control. If the remote system does not
support hardwareflow or tandem mode, echocheck may be
set to indicate that cu
should synchronize with the
remote system on the echo of each transmitted character.
When cu
must dial a phone number to
connect to a system, it will print various messages indicating its actions.
The cu
utility supports a variety of auto-call units
and modems with the at capability in system
descriptions.
Support for Ventel 212+ (ventel), Hayes AT-style (hayes), USRobotics Courier (courier), Telebit T3000 (t3000) and Racal-Vadic 831 (vadic) units is enabled by default.
Support for Bizcomp 1031[fw] (biz31[fw]), Bizcomp 1022[fw]
(biz22[fw]), DEC DF0[23]-AC (df0[23]), DEC DN-11 (dn11) and Racal-Vadic 3451
(v3451) units can be added by recompiling cu
with
the appropriate defines.
Note that if support for both the Racal-Vadic 831 and 3451 is enabled, they are referred to as the v831 and v3451, respectively. If only one of the two is supported, it is referred to as vadic.
The cu
utility maintains a set of
variables which control its operation. Some of these variables are read-only
to normal users (root is allowed to change anything of interest). Variables
may be displayed and set through the ~s
escape. The
syntax for variables is patterned after
vi(1) and
Mail(1). Supplying
“all
” as an argument to the set
command displays all variables readable by the user. Alternatively, the user
may request display of a particular variable by attaching a
‘?
’ to the end. For example,
“escape?
” displays the current escape
character.
Variables are numeric, string, character, or boolean values.
Boolean variables are set merely by specifying their name; they may be reset
by prepending a ‘!
’ to the name. Other
variable types are set by concatenating an
‘=
’ and the value. The entire
assignment must not have any blanks in it. A single set command may be used
to interrogate as well as set a number of variables. Certain common
variables have abbreviations. The following is a list of common variables,
their abbreviations, and their default values:
off
.~<
file transfer
command; abbreviated eofr.~>
file transfer
command; abbreviated eofw.cu
utility will recognize escape
characters only after an end-of-line.~
’.\t\n\f\b
”.^P
’.off
.\n
’. This value is used to
synchronize during data transfers. The count of lines transferred during a
file transfer command is based on receipt of this character.off
.
When this mode is enabled, all lowercase letters will be mapped to
uppercase by cu
for transmission to the remote
machine.off
. When
script is true
,
cu
will record everything transmitted by the
remote machine in the script record file specified in
record. If the beautify switch
is on, only printable ASCII characters will be included in the script file
(those characters between 040 and 0177). The variable
exceptions is used to indicate characters which are
an exception to the normal beautification rules.false
. Each tab is expanded to 8 spaces.true
.true
. When
verbose mode is enabled, cu
prints messages while
dialing, shows the current number of lines transferred during a file
transfer operations, and more.Connect to the first USB serial port at the speed of 115200 baud:
cu -s 115200 -l /dev/cuaU0
The cu
command appeared in
4.2BSD.
The full set of variables is undocumented and should, probably, be pared down.
April 22, 2017 | midnightbsd-3.1 |