SysIII/usr/src/man/man1/cu.1c

.TH CU 1C
.SH NAME
cu \- call another \s-1UNIX\s+1 system
.SH SYNOPSIS
.B cu
.RB [\| \-s speed\|]
.RB [\| \-a acu\|]
.RB [\| \-l line\|]
.RB [\| \-h \|]
.RB [\| \-o \(bv \-e \|]
telno \(bv
.B dir
.SH DESCRIPTION
.I Cu\^
calls up another \s-1UNIX\s+1 system,
a terminal,
or possibly a non-\s-1UNIX\s+1 system.
It manages an interactive conversation with possible
transfers of
.SM ASCII
files.
.I 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.
.PP
The
.B \-a
and
.B \-l
values may be used to
specify device names
for the \s-1ACU\s+1 and communications line devices.
They can be used to override searching for
the first available \s-1ACU\s+1 with the right speed.
The
.B \-h
option emulates local echo, supporting calls to
other computer systems which expect terminals to be
in half-duplex mode.
The
.B \-e
.RB( \-o )
option designates that even (odd) parity is to be
generated for data sent to the remote.
.I Telno\^
is the telephone number,
with equal signs for secondary dial tone or minus signs for delays,
at appropriate places.
The string
.B dir
for
.I telno\^
must be used for directly connected lines,
and implies a null \s-1ACU\s+1.
.PP
.I Cu\^
will try
each line listed in the file
.B /usr/lib/uucp/L-devices
until it finds an available line with appropriate
attributes or runs out of entries.
After making the connection,
.I cu\^
runs as two processes:
the
.I transmit\^
process reads data from the standard input and,
except for lines beginning with
.BR ~ ,
passes it to the remote system;
the
.I receive\^
process accepts data from the remote system and,
except for lines beginning with
.BR ~ ,
passes it to the standard output.
Normally, an automatic \s-1DC\s+1\&3/\s-1DC\s+1\&1 protocol is used to control input
from the remote so the buffer is not overrun.
Lines beginning with \f3~\fP have special meanings.
.PP
The
.I transmit\^
process interprets the following:
.TP 20
.B ~.
terminate the conversation.
.TP
.B ~!
escape to an interactive shell on the local system.
.TP
.BI ~! cmd\|.\|.\|.
run
.I cmd\^
on the local system
(via
.BR "sh \-c" ).
.TP
.BI ~$ cmd\|.\|.\|.
run
.I cmd\^
locally and send its output
to the remote system.
.TP
\&\f3~%take\fP \|\f2from\fP \|[ \|\f2to\fP \|]
copy file
.I from\^
(on the remote system)
to file
.I to\^
on the local system.
If
.I to\^
is omitted,
the
.I from\^
argument is used in both places.
.TP
\&\f3~%put\fP \|\f2from\fP \|[ \|\f2to\fP \|]
copy file
.I from\^
(on local system)
to file
.I to\^
on remote system.
If
.I to\^
is omitted, the
.I from\^
argument is used in both places.
.TP
.BR ~~ .\|.\|.
send the line
.BR ~ ".\|.\|."
to the remote system.
.TP
.BR ~nostop
turn off the \s-1DC\s+1\&3/\s-1DC\s+1\&1
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 \s-1DC\s+1\&3 and \s-1DC\s+1\&1 characters,
.PP
The
.I receive\^
process normally copies data from the remote system to its standard
output.
A line from the remote that begins with \f3~>\fP initiates
an output diversion to a file.
The complete sequence is:
.PP
.RS
\&\f3~>\fP\^[\^\f3>\fP\^]\^\f3:\fP\^\|\f2file\fP
.br
zero or more lines to be written to
.I file\^
.br
.B ~>
.RE
.PP
Data from the remote is diverted (or appended, if
.B >>
is used) to file.
The trailing \f3~>\fP terminates the diversion.
.PP
The use of
.B ~%put
requires
.IR stty (1)
and
.IR 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.
.PP
The use of
.B ~%take
requires the existence of
.IR echo (1)
and
.IR cat (1)
on the remote system.
Also,
.B stty tabs
mode should be set on the remote system if
tabs are to be copied without expansion.
.SH FILES
/usr/lib/uucp/L-devices
.br
/usr/spool/uucp/\s-1LCK\s+1..(tty-device)
.br
/dev/null
.SH SEE ALSO
cat(1), echo(1), stty(1), uucp(1C), dh(4), dn(4), tty(4).
.SH DIAGNOSTICS
Exit code is zero for normal exit,
non-zero (various values) otherwise.
.SH BUGS
There is an artificial slowing of transmission by
.I cu\^
during the
.B ~%put
operation so that loss of data is unlikely.
.br