CU(C) XENIX System V CU(C)
Name
cu - Calls another XENIX system.
Syntax
cu [-sspeed] [-aacu] [-lline] [-h] [-o|-e] telno
cu [-sspeed] [ -lline ] [-h] [-o|-e] dir
Description
cu ``calls up'' another XENIX system through a modem or a
direct serial connection. It also controls the transmission
and reception of data and programs during the call. cu
looks at each line in the file /usr/lib/uucp/L-devices until
it finds a line that matches the options given in the
command line. If it finds an appropriate line, it will
attempt to make a connection. If it cannot find the proper
line, cu quits.
The options are:
-sspeed
Specifies the transmission speed. 1200 baud is the
default value. Other speeds available are 110, 150,
300, 1200, 2400, 4800 and 9600 baud. Directly connected
lines may be set to other speeds. Most modems are
restricted to 300 and 1200 baud.
-aacu
Specifies the device name of the ACU (automatic calling
unit) device. If not specified, cu will use the first
available acu with the right speed.
-lline
Specifies the device name of the communications line.
If not specified, cu will use the first available
direct line (if dir is specified) or acu (if a telno is
specified) with the right speed.
-h Emulates local echo. This feature supports calls to
systems that expect half-duplex mode terminals.
-e Specifies that even-parity data is to be generated for
data sent to the remote system.
-o Specifies that odd-parity data is to be generated for
data sent to the remote system.
Telno is the telephone number of the remote system.
For acu connections, cu invokes /usr/lib/uucp/dial to dial
the modem. Consult your modem manual to determine the
correct sequences to include in the phone number for pauses,
Page 1 (printed 8/7/87)
CU(C) XENIX System V CU(C)
pulse dialing, etc.
For directly connected lines, the string ``dir'' is used
instead of telno. See the Examples later in this section for
sample command lines.
After making the connection, cu runs as two processes:
transmit and receive. 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 XON/XOFF (DC3/DC1) protocol
controls input from the remote system so the buffer is not
overrun. Lines beginning with a tilde have special
meanings.
The transmit process interprets lines beginning with a tilde
as follows:
~. Terminates the conversation.
~! Escapes to an interactive shell on the
local system.
~!cmd... Runs cmd on the local system (via sh
-c).
~$cmd... Runs cmd locally and sends its output to
the remote system.
~%take remote [ local ]
Copies file remote (on the remote
system) to file local on the local
system. If local is omitted, the remote
filename is used in both places. Use of
this line requires the existence of
echo(C) and cat(C) on the remote system.
If tabs are to be copied without
expansion, stty tabs mode should be set
on the remote system.
~%put local [ remote ]
Copies file local (on the local system)
to file remote on the remote system. If
local is omitted, the remote filename is
used in both places. Use of this line
requires the existence of stty(C) and
cat(C) on the remote system. It also
requires that the current erase and kill
characters on the remote system be
identical to the current ones on the
Page 2 (printed 8/7/87)
CU(C) XENIX System V CU(C)
local system. Backslashes are inserted
at appropriate places.
~%b or ~%break Sends a break char to the remote system.
~~... Sends the line ~... to the remote
system.
~%nostop Turns off the XON/XOFF input control
protocol for the remainder of the
session. This is useful if the remote
system is one which does not respond
properly to the XON/XOFF characters.
The receive process normally copies data from the remote
system to its standard output. A line from the remote
system that begins with ~> diverts the output to a file.
Data is appended to a file if ~>> is used. The diversion is
terminated by a trailing ~>. The complete sequence is:
~>[>]:file
zero or more lines to be written to file
~>
Examples
A sample command for a dialup connection is:
cu 5559801
cu selects the first available acu at the default speed of
1200 baud.
A sample command for a direct connection is:
cu dir
cu will select the first available direct line at the
default speed of 1200 baud.
You can force cu to use a specific acu device, line device
or speed with the command line options -a, -l and -s. This
is useful if you wish to use the same modem for dialup
connections at both 300 and 1200 baud, or if you have more
than one directly connected computer. For example:
cu -a tty12 -s 300 5559801
will force cu to place the call through /dev/tty12 at 300
baud.
cu -l tty12 dir
Page 3 (printed 8/7/87)
CU(C) XENIX System V CU(C)
will cause /dev/tty12 to be used for a direct connection at
1200 baud.
Files
/usr/lib/uucp/L-devices Device information
/usr/lib/uucp/dial Dialer program
See Also
cat(C), echo(C), stty(C), tty(M)
Diagnostics
Exit code is zero for normal exit, nonzero (various values)
otherwise.
Device busy: Someone else is using the desired line.
Notes
There is an artificial slowing of transmission by cu during
the ~%put operation so that loss of data is unlikely.
ASCII files only can be transferred using ~%take or ~%put;
binary files cannot be transferred.
cu opens devices for exclusive use. If cu terminates
abnormally, the device may remain locked.
Page 4 (printed 8/7/87)