CU(1C) — UNIX 3.0
NAME
cu − call another UNIX system
SYNOPSIS
cu [−sspeed] [−aacu] [−lline] [−h] [−o│−e] telno │ dir
DESCRIPTION
Cu calls up another UNIX system, a terminal, or possibly a non-UNIX system. It manages an interactive conversation with possible transfers of ASCII files. Speed gives the transmission speed (110, 150, 300, 1200, 4800, 9600); 300 is the default value. Most of our modems restrict us to choose between 300 and 1200. Directly connected lines may be set to other speeds.
The −a and −l values may be used to specify device names for the ACU and communications line devices. They can be used to override searching for the first available ACU with the right speed. The −h option emulates local echo, supporting calls to other computer systems which expect terminals to be in half-duplex mode. The −e (−o) option designates that even (odd) parity is to be generated for data sent to the remote. Telno is the telephone number, with equal signs for secondary dial tone or minus signs for delays, at appropriate places. The string dir for telno must be used for directly connected lines, and implies a null ACU.
Cu will try each line listed in the file /usr/lib/uucp/L-devices until it finds an available line with appropriate attributes or runs out of entries. After making the connection, cu runs as two processes: the transmit process reads data from the standard input and, except for lines beginning with ~, passes it to the remote system; the receive process accepts data from the remote system and, except for lines beginning with ~, 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 ~ have special meanings.
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 sh −c).
~$cmd... run cmd locally and send its output to the remote system.
~%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 local system) to file to on remote system. If to is omitted, the from argument is used in both places.
~~... send the line ~... to the remote system.
~nostop turn off the DC3/DC1 input control protocol for the remainder of the session. This is useful in case the remote system is one which does not respond properly to the DC3 and DC1 characters,
The receive process normally copies data from the remote system to its standard output. A line from the remote that begins with ~> initiates an output diversion to a file. The complete sequence is:
~>[>]: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.
The use of ~%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.
The use of ~%take requires the existence of echo(1) and cat(1) on the remote system. Also, stty tabs mode should be set on the remote system if tabs are to be copied without expansion.
FILES
/usr/lib/uucp/L-devices
/usr/spool/uucp/LCK..(tty-device)
/dev/null
SEE ALSO
cat(1), echo(1), stty(1), uucp(1C), dh(4), dn(4), tty(4).
DIAGNOSTICS
Exit code is zero for normal exit, non-zero (various values) otherwise.
BUGS
There is an artificial slowing of transmission by cu during the ~%put operation so that loss of data is unlikely.
May 16, 1980