CU(1) DOMAIN/IX Reference Manual (SYS5) CU(1)
NAME
cu - call another UNIX system
USAGE
cu [ -sspeed ] [ -lline ] [-h] [-t] [-d] [-m] [-o] [-e] [-n]
telno | systemname | dir
DESCRIPTION
Cu calls up another UNIX system, a terminal, or possibly a
non-UNIX system. It manages an interactive conversation
with possible ASCII file transfers.
After making the connection, cu runs as two processes: the
transmit process reads data from the standard input and,
except for lines beginning with a tilde (~), passes it to
the remote system; the receive process accepts data from the
remote system and, except for lines beginning with a tilde
(~), passes it to the standard output. Normally, an
automatic DC3/DC1 protocol is used to control input from the
remote so the buffer is not overrun. Lines beginning with a
tilde (~) have special meanings. Both the transmit and the
receive processes are described in the sections below.
When cu is used on system X to connect to system Y and sub-
sequently used on system Y to connect to system Z, commands
on system Y can be executed by using a double tilde (~~).
For example, uname (1) can be executed on Z, X, and Y as
follows:
uname
Z
~!uname
X
~~!uname
Y
In general, a tilde causes the command to be executed on the
original machine; a double tilde causes the command to be
executed on the next machine in the chain.
The DOMAIN/IX version of cu supports the Vadic 212 Autodi-
aler.
OPTIONS
-sspeed Specify the transmission speed(110, 150, 300, 600,
1200, 4800, or 9600); 300 is the default value.
Most modems are either 300 or 1200 baud.
Directly-connected lines may be set to a speed
higher than 1200 baud.
-lline Specify a device name to use as the communication
line. Can be used to override searching for the
Printed 6/10/85 CU-1
CU(1) DOMAIN/IX Reference Manual (SYS5) CU(1)
first available line having the right speed. When
this option is used without the -s option, the
speed of a line is taken from the
/usr/lib/uucp/L-devices file. With the -s option,
the L-devices file is searched for the requested
speed for the requested line. If possible, the
connection is made at the requested speed; other-
wise, an error message is printed and the call is
not made. The specified device is generally a
directly-connected asynchronous line; therefore, a
phone number is not required but the string dir
may be used to specify a null acu. If the speci-
fied device is associated with an auto dialer, a
phone number must be provided.
-h Emulate local echo, supporting calls to other com-
puter systems that expect terminals to be set to
half-duplex mode.
-t Set appropriate mapping of carriage-return to
carriage-return-line-feed pairs. Used when dial-
ing an ASCII terminal set to auto answer.
-d Print diagnostic traces.
-e Generate even parity for data sent to the remote.
-o Generate odd parity for data sent to the remote.
-m Designate a direct line with modem control.
-n Request the phone number to be dialed from the
user rather than taking it from the command line.
SPECIAL ARGUMENTS
telno When using an automatic dialer, telno is the
telephone number with equal signs for secon-
dary dial tone or minus signs for delays, at
appropriate places.
systemname Systemname is a uucp system name that may be
used rather than a phone number. Cu obtains
an appropriate direct line or phone number
from /usr/lib/uucp/L.sys (the appropriate
baud rate is also read along with phone
numbers). Cu tries each phone number or
direct line for systemname in the L.sys file
until a connection is made or all the entries
are tried.
dir Using dir ensures that cu uses the line
specified by the -l option.
CU-2 Printed 6/10/85
CU(1) DOMAIN/IX Reference Manual (SYS5) CU(1)
TRANSMIT PROCESS
The transmit process interprets the following:
~. Terminate the conversation.
~! Escape to an interactive Shell on the
local system.
~!cmd... Run cmd on the local system, via the -c
option to the sh (1) command.
~$cmd... Run cmd locally and send its output to
the remote system.
~%cd Change the directory on the local sys-
tem. NOTE: A ~!cd causes the command to
be run by a sub-Shell, which was prob-
ably not what was intended.
Printed 6/10/85 CU-3
CU(1) DOMAIN/IX Reference Manual (SYS5) CU(1)
~%take from [ to ] Copy file from (on the remote system) to
file to on the local system. If to is
omitted, the from argument is used in
both places.
~%put from [ to ] Copy file from (on the local system) to
file to on the remote system. If to is
omitted, the from argument is used in
both places.
~~... Send the line ~... to the remote sys-
tem.
~%break Transmit a break to the remote system.
~%nostop Toggle between DC3/DC1 input control
protocol and no input control. This is
useful when the remote system is one
that does not respond properly to the
DC3 and DC1 characters.
RECEIVE PROCESS
The receive process normally copies data from the remote
system to its standard output. A line from the remote
beginning with ~> initiates an output diversion to a file.
The complete sequence is as follows:
~>[>]:file
zero or more lines to be written to file
~>
Data from the remote is diverted (or appended, if >> is
used) to file. The trailing ~> terminates the diversion.
Using ~%put requires stty (1) and cat (1) on the remote
side. It also requires that the current erase and kill
characters on the remote system be identical to the current
ones on the local system. Backslashes are inserted at
appropriate places. There is an artificial slowing of
transmission during the ~%put operation, so that loss of
data is unlikely.
Using ~%take requires echo (1) and cat (1) on the remote
system. The stty tabs mode should also be set on the remote
system, if tabs are to be copied without expansion.
EXAMPLES
To dial a system whose number is 9 201 555 1212 using 1200
baud (default speed is 300), use the following command:
cu -s1200 9=2015551212
CU-4 Printed 6/10/85
CU(1) DOMAIN/IX Reference Manual (SYS5) CU(1)
To log in to a system connected by a direct line, type this
(where XX is a valid TTY number):
cu -l /dev/ttyXX dir
Printed 6/10/85 CU-5
CU(1) DOMAIN/IX Reference Manual (SYS5) CU(1)
To dial a system with the specific line and a specific
speed, type this (where XX is a valid TTY number):
cu -s1200 -l /dev/ttyXX dir
To dial a system using a specific line, execute the follow-
ing command (where XX is a line number):
cu -l /dev/culXX 2015551212
To use a system name, use this command (where YYYZZZ is the
name of the system):
cu YYYZZZ
CAUTIONS
If you perform a cu to a DOMAIN node whose default start-up
Shell is /com/sh (as opposed to /bin/sh or /bin/csh), it is
recommended that one of the following two things be done: 1)
appropriately change your command search rules (i.e., do a
csr -a /bin /usr/bin ... inside the AEGIS Shell) so that the
cu transmit process can properly locate DOMAIN/IX commands,
or 2) have the remote start-up AEGIS Shell invoke a
DOMAIN/IX Shell (i.e., /bin/sh) so that the cu receive pro-
cess can properly parse the request (since the tilde charac-
ter has a special meaning in the AEGIS Shell).
Cu buffers input internally.
FILES
/usr/lib/uucp/L.sys
/usr/lib/uucp/L-devices
/usr/spool/uucp/LCK..(tty-device)
/dev/null
DIAGNOSTICS
Exit code is zero for normal exit, non-zero (various values)
otherwise.
RELATED INFORMATION
cat (1), echo (1), stty (1), uname (1), uucp (1).
CU-6 Printed 6/10/85