Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cu(1C) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cat(1)

ct(1C)

echo(1)

ftp(1N)

stty(1)

telnet(1N)

tip(1C)

uname(1)

uucp(1C)

cu(1C)




cu(1C) cu(1C)
NAME cu - call another system SYNOPSIS cu [-d] [-e] [-h] [-lline] [-m] [-n] [-o] [-sspeed] [-t] args DESCRIPTION cu calls up another system and manages an interactive conversation with possible transfers of ASCII files. cu accepts the following flag options and arguments. -sspeed Specifies the transmission speed (110, 150, 300, 600, 1200, 4800, 9600); 300 being 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 Specifies a device name to use as the communication line. This can be used to override the search for the first available line having the right speed. When the -l flag option is used without the -s flag option, the speed of a line is taken from the file /usr/lib/uucp/L-devices. When the -l and -s flag op- tions are used simultaneously, cu will search the L- devices file to check if the requested speed for the requested line is available. If so, the connection will be made at the requested speed; otherwise, an er- ror message will be printed and the call will not be made. The specified device is generally a directly- connected asynchronous line (for example, /dev/ttyab), in which case, a telephone number is not required; how- ever, the string dir may be use to specify a null ACU. If the specified device is associated with an auto di- aler, a telephone number must be provided. -h Emulates local echo, supporting calls to other computer systems which expect terminals to be set to half-duplex mode. -t Used when dialing an ASCII terminal which has been set to ``auto answer.'' Appropriate mapping of return to return-line feed pairs is set. -d Causes diagnostic traces to be printed. -e Designates that even parity is to be generated for data sent to the remote. -o Designates that odd parity is to be generated for data April, 1990 1



cu(1C) cu(1C)
sent to the remote. -m Designates a direct line which has modem control. -n Will request the telephone number to be dialed from the user rather than taking it from the command line. args may be one of the following: telno When using an automatic dialer, the argument becomes the telephone number with equal signs at appropriate places for secondary dial tone or with minus signs for delays. systemname A uucp system name may be used rather than a telephone number; in this case, cu will obtain an appropriate direct line or telephone number from /usr/lib/uucp/L.sys (the appropriate baud is also read along with telephone numbers). cu will try each tele- 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 will use the line specified by the -l flag option. After making the connection, cu runs as two processes: the transmit process reads data from the standard input and, ex- cept 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 proto- col is used to control input from the remote so the buffer is not overrun. Lines beginning with ~ have special mean- ings. 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. ~%cd Change the directory on the local system. Note that ~!cd will cause the command to be 2 April, 1990



cu(1C) cu(1C)
run by a sub-shell, which is probably not what was intended. ~%take from [to] Copy file from (on the remote system) to the file to on the local system. If to is omit- ted, the from argument is used in both places. ~%put from [to] Copy file from (on local system) to the file to on remote system. If to is omitted, the from argument is used in both places. ~~cmd Send the line ~cmd to the remote system. ~%break Transmit a BREAK to the remote system. ~%nostop Toggles between DC3/DC1 input control proto- col and no input control. This is useful in case the remote system is one which does not respond properly to the DC3 and DC1 charac- ters. 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 are 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 ap- propriate 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. 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 ~~. For example, uname may be executed on Z, X, and Y as follows: April, 1990 3



cu(1C) cu(1C)
uname Z ~!uname X ~~!uname Y In general, ~ causes the command to be executed on the ori- ginal machine, ~~ causes the command to be executed on the next machine in the chain. EXAMPLES In the following examples, assume that you wish to connect to a system named plato through the serial line /dev/tty0. To dial a system whose number is 9 201 555 9999 using 1200 baud cu -s1200 9=2015559999 If the speed is not specified, 300 is the default value. To login to a system connected by a direct line cu -l /dev/tty0 dir To dial a system with the specific line and a specific speed cu -s1200 -l /dev/tty0 dir To dial a system using a specific line cu -l /dev/cul0 2015559999 To use a system name cu plato FILES /usr/bin/cu /usr/lib/uucp/L.sys /usr/lib/uucp/L-devices /usr/spool/uucp/LCK..tty-device /dev/null SEE ALSO cat(1), ct(1C), echo(1), ftp(1N), stty(1), telnet(1N), tip(1C), uname(1), uucp(1C). ``Using cu'' in A/UX Communications User's Guide. ``UNIX-to-UNIX Communcations Package: uucp'' in A/UX Local System Administration. 4 April, 1990



cu(1C) cu(1C)
DIAGNOSTICS Exit code is zero for normal exit, nonzero (various values) otherwise. BUGS cu buffers input internally. There is an artificial slowing of transmission by cu during the ~%put operation so that loss of data is unlikely. NOTES Any input character after a ~ will be preceded by [sysname] (inserted by cu). April, 1990 5

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026