up | Inhaltsverzeichniss | Kommentar

Manual page for CU(1C)

cu - connect to remote system

SYNOPSIS

cu [ -dhnt ] [ -e | -o ] [ -l line ] [ -s speed ] phone-number

cu [ -dh ] [ -e | -o ] [ -s speed ] -l line

cu [ -dh ] [ -e | -o ] systemname

DESCRIPTION

cu calls up another system, or possibly a terminal. It manages an interactive conversation with possible transfers of ASCII files.

If phone-number is specified, it is the telephone number of the system to be dialed. Equal signs specify a pause for a secondary dial tone, and minus signs specify dialing delays of 4 seconds. If systemname is specified, it is the UUCP name of a the system to be dialed; in this case, cu will obtain an appropriate direct line or telephone number from /etc/uucp/Systems. Note: the systemname option should not be used in conjunction with the -l and -s options as cu will connect to the first available line for the system name specified, ignoring the requested line and speed. If neither phone-number nor systemname are specified, the -l line option must be provided; line specifies the device name to use.

OPTIONS

-d
Print diagnostic traces.
-h
Emulate local echo, supporting calls to other computer systems which expect terminals to be set to half-duplex mode.
-n
For added security, prompt the user to provide the telephone number to be dialed rather than taking it from the command line.
-t
Perform appropriate mapping of RETURN to RETURN-LINE-FEED pairs. This is used to dial an ASCII terminal which has been set to auto answer.
-e
Generate even parity for data sent to the remote system.
-o
Generate odd parity for data sent to the remote system.
-l line
Specify a device name to use as the communication line. This can be used to override the search that would otherwise take place for the first available line having the right speed. When the -l option is used without the -s option, the speed of a line is taken from the /etc/uucp/Devices file. When the -l and -s options are both used together, cu will search the 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 error 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 (phone-number) is not required. The specified device need not be in the /dev directory. If the specified device is associated with an auto dialer, a telephone number must be provided. Use of this option with systemname rather than phone-number will not give the desired result (see systemname below).
-s speed
Specify the transmission speed (300, 1200, 2400, 4800, 9600); The default value is ``Any'' speed which will depend on the order of the lines in the Devices file. Most modems are either 300 or 1200 baud. Directly connected lines may be set to a speed higher than 1200 baud.

USAGE

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 XON/XOFF protocol is used to control input from the remote so the buffer is not overrun.

Commands

A tilde (~) appearing as the first character of a line is an escape signal which directs cu to perform some special action. The transmit recognizes the following escape sequences:

~.
Drop the connection and exit (you may still be logged in on the remote machine).
~!
Escape to an interactive shell on the local machine (exiting the shell returns you to cu).
~!cmd
Run the command cmd on the local system (using sh -c).
~$cmd
Run the command cmd locally and send its output to the remote system.
~%cd
Change the directory on the local system. Note: ~!cd will cause the command to be run by a sub-shell, probably not what was intended.
~%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.

For both ~%take and ~%put commands, as each block of the file is transferred, consecutive single digits are printed to the terminal.

~~line
Send the line ~line to the remote system.
~%break
Send a BREAK to the remote system (which can also be specified as ~%b).
~%debug
Toggle the -d debugging option on or off (which can also be specified as ~%d).
~t
Prints the values of the termio.4 structure variables for the user's terminal (useful for debugging).
~l
Prints the values of the termio structure variables for the remote communication line (useful for debugging).
~%nostop
Toggle between XON/XOFF input control protocol and no input control. This is useful in case the remote system is one which does not respond properly to the XON or XOFF characters.

The receive process normally copies data from the remote system to its standard output. Internally the program accomplishes this by initiating an output diversion to a file when a line from the remote begins with ~.

Data from the remote is diverted (or appended, if >> is used) to file on the local system. The trailing ~> marks the end of the diversion.

The use of ~%put requires stty.1v and cat.1v on the remote side. It also requires that the current erase and kill characters on the remote system be identical to these current control characters on the local system. Backslashes are inserted at appropriate places.

The use of ~%take requires the existence of echo.1v and cat.1v on the remote system. Also, tabs mode (see stty.1v should be set on the remote system if TAB characters are to be copied without expansion to SPACE characters.

When cu is used on system X to connect to system Y and subsequently used on system Y to connect to system Z, commands on system Y can be executed by using ~~. In general, ~ executes the command on the original machine, ~~ executes the command on the next machine in the chain.

EXAMPLES

To dial a system whose telephone number is 9 201 555 1212 using 1200 baud (where dialtone is expected after the 9):

cu -s1200 9=12015551212

If the speed is not specified, ``Any'' is the default value.

To login to a system connected by a direct line:

cu -l /dev/ttyXX

or

cu -l ttyXX

To dial a system with the specific line and a specific speed:

cu -s1200 -l ttyXX

To dial a system using a specific line associated with an auto dialer:

cu -l culXX 9=12015551212

To use a system name:

cu systemname

FILES

/etc/uucp/Systems
file listing remote systems
/etc/uucp/Devices
file listing devices to use
/var/spool/locks/LCK ..*
lock file to avoid conflicts with UUCP

SEE ALSO

cat.1v echo.1v stty.1v tip.1c uucp.1c termio.4

DIAGNOSTICS

Exit code is zero for normal exit, otherwise, 1.

WARNINGS

The cu command does not do any integrity checking on data it transfers. Data fields with special cu characters may not be transmitted properly. Depending on the interconnection hardware, it may be necessary to use a `~.' to terminate the conversion even if stty 0 has been used. Non-printing characters are not dependably transmitted using either the ~%put or ~%take commands.

BUGS

There is an artificial slowing of transmission by cu during the ~%put operation so that loss of data is unlikely.


index | Inhaltsverzeichniss | Kommentar

Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97