Annotation of src/usr.bin/cu/cu.1, Revision 1.9
1.9 ! nicm 1: .\" $OpenBSD: cu.1,v 1.8 2013/03/09 19:27:48 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.9 ! nicm 32: .Dd $Mdocdate: March 9 2013 $
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
42: .Sh DESCRIPTION
43: .Nm
44: is used to connect to another system over a serial link.
45: In the era before modern networks, it was typically used to
46: connect to a modem in order to dial in to a remote host.
47: It is now frequently used for tasks such as attaching to the
48: serial console of another machine for administrative or
49: debugging purposes.
50: .Pp
51: The options are as follows:
52: .Bl -tag -width 4n
53: .It Fl l Ar line
54: Specify the line to use.
55: Either of the forms like
1.9 ! nicm 56: .Pa cua00
1.1 nicm 57: or
1.9 ! nicm 58: .Pa /dev/cua00
1.1 nicm 59: are permitted.
60: The default is
61: .Pa /dev/cua00 .
1.9 ! nicm 62: See
1.1 nicm 63: .Xr cua 4
1.9 ! nicm 64: for information on terminal devices.
1.1 nicm 65: Users in group
66: .Dq dialer
67: are permitted to use
68: .Xr cua 4
1.9 ! nicm 69: devices by default.
1.1 nicm 70: .It Fl s Ar speed \*(Ba Fl Ar speed
71: Set the speed of the connection.
72: The default is 9600.
73: .El
74: .Pp
75: Typed characters are normally transmitted directly to the remote
76: machine (which does the echoing as well).
77: A tilde
78: .Pq Ql ~
79: appearing as the first character of a line is an escape signal; the
80: following are recognized:
81: .Bl -tag -offset indent -width Fl
82: .It Ic ~^D No or Ic ~.
83: Drop the connection and exit.
84: Only the connection is dropped \(en the login session is not terminated.
85: .It Ic ~\*(Gt
86: Copy file from local to remote.
87: .Nm
88: prompts for the name of a local file to transmit.
89: .It Ic ~$
90: Pipe the output from a local
91: .Ux
92: process to the remote host.
93: The command string sent to the local
94: .Ux
95: system is processed by the shell.
96: .It Ic ~#
97: Send a
98: .Dv BREAK
99: to the remote system.
100: .It Ic ~^Z
101: Stop
102: .Nm
103: (only available with job control).
1.3 nicm 104: .It Ic ~C
105: Fork a child process on the local system to perform special protocols
106: such as XMODEM.
107: The child program will be run with the following arrangement of
108: file descriptors:
109: .Bd -literal -offset indent
110: 0 \*(Lt-\*(Gt remote tty in
111: 1 \*(Lt-\*(Gt remote tty out
112: 2 \*(Lt-\*(Gt local tty stderr
113: .Ed
1.7 nicm 114: .It Ic ~D
115: Deassert the data terminal ready (DTR) line briefly.
1.5 nicm 116: .It Ic ~R
117: Record all output from the remote system to a file.
118: If the given file already exists, it is appended to.
119: If no file is specified, any existing recording is stopped.
1.2 nicm 120: .It Ic ~S
121: Change the speed of the connection.
1.4 nicm 122: .It Ic ~X
1.6 nicm 123: Send a file with the XMODEM protocol.
1.1 nicm 124: .It Ic ~?
125: Get a summary of the tilde escapes.
126: .El
127: .Pp
128: When
129: .Nm
130: prompts for an argument, for example during setup of a file transfer,
131: the line typed may be edited with the standard erase and kill characters.
132: A null line in response to a prompt, or an interrupt, will abort the
133: dialogue and return the user to the remote machine.
134: .Pp
135: .Nm
136: guards against multiple users connecting to a remote system by opening
137: modems and terminal lines with exclusive access.
138: .Sh HISTORY
139: The
140: .Nm
141: command appeared in
142: .Bx 4.2 .
143: This version was written for
1.8 nicm 144: .Ox 5.4
1.1 nicm 145: by Nicholas Marriott.