[BACK]Return to cu.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / cu

Annotation of src/usr.bin/cu/cu.1, Revision 1.15

1.15    ! nicm        1: .\"    $OpenBSD: cu.1,v 1.14 2015/04/24 18:06:31 deraadt Exp $
1.1       nicm        2: .\"
                      3: .\" Copyright (c) 1980, 1990, 1993
                      4: .\"    The Regents of the University of California.  All rights reserved.
                      5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\" 1. Redistributions of source code must retain the above copyright
                     10: .\"    notice, this list of conditions and the following disclaimer.
                     11: .\" 2. Redistributions in binary form must reproduce the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer in the
                     13: .\"    documentation and/or other materials provided with the distribution.
                     14: .\" 3. Neither the name of the University nor the names of its contributors
                     15: .\"    may be used to endorse or promote products derived from this software
                     16: .\"    without specific prior written permission.
                     17: .\"
                     18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     21: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     28: .\" SUCH DAMAGE.
                     29: .\"
1.15    ! nicm       30: .Dd $Mdocdate: April 24 2015 $
1.1       nicm       31: .Dt CU 1
                     32: .Os
                     33: .Sh NAME
                     34: .Nm cu
                     35: .Nd serial terminal emulator
                     36: .Sh SYNOPSIS
                     37: .Nm
1.15    ! nicm       38: .Op Fl d
1.1       nicm       39: .Op Fl l Ar line
1.13      bentley    40: .Op Fl s Ar speed | Fl Ar speed
1.12      nicm       41: .Nm
1.10      nicm       42: .Op Ar host
1.1       nicm       43: .Sh DESCRIPTION
                     44: .Nm
                     45: is used to connect to another system over a serial link.
                     46: In the era before modern networks, it was typically used to
                     47: connect to a modem in order to dial in to a remote host.
                     48: It is now frequently used for tasks such as attaching to the
                     49: serial console of another machine for administrative or
                     50: debugging purposes.
                     51: .Pp
                     52: The options are as follows:
                     53: .Bl -tag -width 4n
1.15    ! nicm       54: .It Fl d
        !            55: Specify that the line is directly connected and
        !            56: .Nm
        !            57: should not allow the driver to block waiting for a carrier to be detected.
1.1       nicm       58: .It Fl l Ar line
                     59: Specify the line to use.
                     60: Either of the forms like
1.9       nicm       61: .Pa cua00
1.1       nicm       62: or
1.9       nicm       63: .Pa /dev/cua00
1.1       nicm       64: are permitted.
                     65: The default is
                     66: .Pa /dev/cua00 .
1.9       nicm       67: See
1.1       nicm       68: .Xr cua 4
1.9       nicm       69: for information on terminal devices.
1.1       nicm       70: Users in group
                     71: .Dq dialer
                     72: are permitted to use
                     73: .Xr cua 4
1.9       nicm       74: devices by default.
1.13      bentley    75: .It Fl s Ar speed | Fl Ar speed
1.1       nicm       76: Set the speed of the connection.
                     77: The default is 9600.
                     78: .El
                     79: .Pp
1.10      nicm       80: If
                     81: .Ar host
                     82: is given,
                     83: .Nm
                     84: uses the
                     85: .Xr remote 5
1.11      nicm       86: database to retrieve the
1.15    ! nicm       87: .Sy dc Pq directly connected ,
1.10      nicm       88: .Sy dv Pq device
                     89: and
                     90: .Sy br Pq baud rate
                     91: capabilities for that host.
                     92: The
                     93: .Nm
                     94: utility ignores other capabilities found in that database.
                     95: .Pp
1.1       nicm       96: Typed characters are normally transmitted directly to the remote
                     97: machine (which does the echoing as well).
                     98: A tilde
                     99: .Pq Ql ~
                    100: appearing as the first character of a line is an escape signal; the
                    101: following are recognized:
                    102: .Bl -tag -offset indent -width Fl
                    103: .It Ic ~^D No or Ic ~.
                    104: Drop the connection and exit.
                    105: Only the connection is dropped \(en the login session is not terminated.
                    106: .It Ic ~\*(Gt
                    107: Copy file from local to remote.
                    108: .Nm
                    109: prompts for the name of a local file to transmit.
                    110: .It Ic ~$
                    111: Pipe the output from a local
                    112: .Ux
                    113: process to the remote host.
                    114: The command string sent to the local
                    115: .Ux
                    116: system is processed by the shell.
                    117: .It Ic ~#
                    118: Send a
                    119: .Dv BREAK
                    120: to the remote system.
                    121: .It Ic ~^Z
                    122: Stop
                    123: .Nm
                    124: (only available with job control).
1.3       nicm      125: .It Ic ~C
                    126: Fork a child process on the local system to perform special protocols
                    127: such as XMODEM.
                    128: The child program will be run with the following arrangement of
                    129: file descriptors:
                    130: .Bd -literal -offset indent
                    131: 0 \*(Lt-\*(Gt remote tty in
                    132: 1 \*(Lt-\*(Gt remote tty out
                    133: 2 \*(Lt-\*(Gt local tty stderr
                    134: .Ed
1.7       nicm      135: .It Ic ~D
                    136: Deassert the data terminal ready (DTR) line briefly.
1.5       nicm      137: .It Ic ~R
                    138: Record all output from the remote system to a file.
                    139: If the given file already exists, it is appended to.
                    140: If no file is specified, any existing recording is stopped.
1.2       nicm      141: .It Ic ~S
                    142: Change the speed of the connection.
1.4       nicm      143: .It Ic ~X
1.6       nicm      144: Send a file with the XMODEM protocol.
1.1       nicm      145: .It Ic ~?
                    146: Get a summary of the tilde escapes.
                    147: .El
                    148: .Pp
                    149: When
                    150: .Nm
                    151: prompts for an argument, for example during setup of a file transfer,
                    152: the line typed may be edited with the standard erase and kill characters.
                    153: A null line in response to a prompt, or an interrupt, will abort the
                    154: dialogue and return the user to the remote machine.
                    155: .Pp
                    156: .Nm
                    157: guards against multiple users connecting to a remote system by opening
                    158: modems and terminal lines with exclusive access.
1.10      nicm      159: .Sh ENVIRONMENT
1.11      nicm      160: .Bl -tag -width REMOTEXXX
                    161: .It Ev HOST
                    162: The default value for
                    163: .Ar host
                    164: if none is specified via the command line.
                    165: .It Ev REMOTE
                    166: A system description, or an absolute path to a
1.10      nicm      167: .Xr remote 5
1.11      nicm      168: system description database.
                    169: .El
1.10      nicm      170: .Sh FILES
                    171: .Bl -tag -width /etc/remote
                    172: .It Pa /etc/remote
                    173: host description file
                    174: .El
1.11      nicm      175: .Sh EXIT STATUS
                    176: .Ex -std cu
                    177: .Sh SEE ALSO
                    178: .Xr remote 5
1.1       nicm      179: .Sh HISTORY
                    180: The
                    181: .Nm
                    182: command appeared in
                    183: .Bx 4.2 .
                    184: This version was written for
1.8       nicm      185: .Ox 5.4
1.1       nicm      186: by Nicholas Marriott.