Annotation of src/usr.bin/cu/cu.1, Revision 1.11
1.11 ! nicm 1: .\" $OpenBSD: cu.1,v 1.10 2014/03/26 13:00:50 nicm 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: .\"
30: .\" @(#)tip.1 8.4 (Berkeley) 4/18/94
31: .\"
1.11 ! nicm 32: .Dd $Mdocdate: March 26 2014 $
1.1 nicm 33: .Dt CU 1
34: .Os
35: .Sh NAME
36: .Nm cu
37: .Nd serial terminal emulator
38: .Sh SYNOPSIS
39: .Nm
40: .Op Fl l Ar line
41: .Op Fl s Ar speed \*(Ba Fl Ar speed
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
54: .It Fl l Ar line
55: Specify the line to use.
56: Either of the forms like
1.9 nicm 57: .Pa cua00
1.1 nicm 58: or
1.9 nicm 59: .Pa /dev/cua00
1.1 nicm 60: are permitted.
61: The default is
62: .Pa /dev/cua00 .
1.9 nicm 63: See
1.1 nicm 64: .Xr cua 4
1.9 nicm 65: for information on terminal devices.
1.1 nicm 66: Users in group
67: .Dq dialer
68: are permitted to use
69: .Xr cua 4
1.9 nicm 70: devices by default.
1.1 nicm 71: .It Fl s Ar speed \*(Ba Fl Ar speed
72: Set the speed of the connection.
73: The default is 9600.
74: .El
75: .Pp
1.10 nicm 76: If
77: .Ar host
78: is given,
79: .Nm
80: uses the
81: .Xr remote 5
1.11 ! nicm 82: database to retrieve the
1.10 nicm 83: .Sy dv Pq device
84: and
85: .Sy br Pq baud rate
86: capabilities for that host.
87: The
88: .Nm
89: utility ignores other capabilities found in that database.
90: .Pp
1.1 nicm 91: Typed characters are normally transmitted directly to the remote
92: machine (which does the echoing as well).
93: A tilde
94: .Pq Ql ~
95: appearing as the first character of a line is an escape signal; the
96: following are recognized:
97: .Bl -tag -offset indent -width Fl
98: .It Ic ~^D No or Ic ~.
99: Drop the connection and exit.
100: Only the connection is dropped \(en the login session is not terminated.
101: .It Ic ~\*(Gt
102: Copy file from local to remote.
103: .Nm
104: prompts for the name of a local file to transmit.
105: .It Ic ~$
106: Pipe the output from a local
107: .Ux
108: process to the remote host.
109: The command string sent to the local
110: .Ux
111: system is processed by the shell.
112: .It Ic ~#
113: Send a
114: .Dv BREAK
115: to the remote system.
116: .It Ic ~^Z
117: Stop
118: .Nm
119: (only available with job control).
1.3 nicm 120: .It Ic ~C
121: Fork a child process on the local system to perform special protocols
122: such as XMODEM.
123: The child program will be run with the following arrangement of
124: file descriptors:
125: .Bd -literal -offset indent
126: 0 \*(Lt-\*(Gt remote tty in
127: 1 \*(Lt-\*(Gt remote tty out
128: 2 \*(Lt-\*(Gt local tty stderr
129: .Ed
1.7 nicm 130: .It Ic ~D
131: Deassert the data terminal ready (DTR) line briefly.
1.5 nicm 132: .It Ic ~R
133: Record all output from the remote system to a file.
134: If the given file already exists, it is appended to.
135: If no file is specified, any existing recording is stopped.
1.2 nicm 136: .It Ic ~S
137: Change the speed of the connection.
1.4 nicm 138: .It Ic ~X
1.6 nicm 139: Send a file with the XMODEM protocol.
1.1 nicm 140: .It Ic ~?
141: Get a summary of the tilde escapes.
142: .El
143: .Pp
144: When
145: .Nm
146: prompts for an argument, for example during setup of a file transfer,
147: the line typed may be edited with the standard erase and kill characters.
148: A null line in response to a prompt, or an interrupt, will abort the
149: dialogue and return the user to the remote machine.
150: .Pp
151: .Nm
152: guards against multiple users connecting to a remote system by opening
153: modems and terminal lines with exclusive access.
1.10 nicm 154: .Sh ENVIRONMENT
1.11 ! nicm 155: .Bl -tag -width REMOTEXXX
! 156: .It Ev HOST
! 157: The default value for
! 158: .Ar host
! 159: if none is specified via the command line.
! 160: .It Ev REMOTE
! 161: A system description, or an absolute path to a
1.10 nicm 162: .Xr remote 5
1.11 ! nicm 163: system description database.
! 164: .El
1.10 nicm 165: .Sh FILES
166: .Bl -tag -width /etc/remote
167: .It Pa /etc/remote
168: host description file
169: .El
1.11 ! nicm 170: .Sh EXIT STATUS
! 171: .Ex -std cu
! 172: .Sh SEE ALSO
! 173: .Xr remote 5
1.1 nicm 174: .Sh HISTORY
175: The
176: .Nm
177: command appeared in
178: .Bx 4.2 .
179: This version was written for
1.8 nicm 180: .Ox 5.4
1.1 nicm 181: by Nicholas Marriott.