| 1 | .\" Copyright (c) 1980, 1990 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" Redistribution and use in source and binary forms, with or without |
| 5 | .\" modification, are permitted provided that the following conditions |
| 6 | .\" are met: |
| 7 | .\" 1. Redistributions of source code must retain the above copyright |
| 8 | .\" notice, this list of conditions and the following disclaimer. |
| 9 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 10 | .\" notice, this list of conditions and the following disclaimer in the |
| 11 | .\" documentation and/or other materials provided with the distribution. |
| 12 | .\" 3. All advertising materials mentioning features or use of this software |
| 13 | .\" must display the following acknowledgement: |
| 14 | .\" This product includes software developed by the University of |
| 15 | .\" California, Berkeley and its contributors. |
| 16 | .\" 4. Neither the name of the University nor the names of its contributors |
| 17 | .\" may be used to endorse or promote products derived from this software |
| 18 | .\" without specific prior written permission. |
| 19 | .\" |
| 20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
| 21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
| 24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
| 28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 30 | .\" SUCH DAMAGE. |
| 31 | .\" |
| 32 | .\" @(#)tip.1 6.8 (Berkeley) 7/27/91 |
| 33 | .\" |
| 34 | .Dd July 27, 1991 |
| 35 | .Dt TIP 1 |
| 36 | .Os BSD 4 |
| 37 | .Sh NAME |
| 38 | .Nm tip , |
| 39 | .Nm cu |
| 40 | .Nd connect to a remote system |
| 41 | .Sh SYNOPSIS |
| 42 | .Nm tip |
| 43 | .Op Fl v |
| 44 | .Fl Ns Ns Ar speed |
| 45 | .Ar system\-name |
| 46 | .Nm tip |
| 47 | .Op Fl v |
| 48 | .Fl Ns Ns Ar speed |
| 49 | .Ar phone\-number |
| 50 | .Nm cu |
| 51 | .Ar phone\-number |
| 52 | .Op Fl t |
| 53 | .Op Fl s Ar speed |
| 54 | .Op Fl a Ar acu |
| 55 | .Op Fl l Ar line |
| 56 | .Op Fl # |
| 57 | .Sh DESCRIPTION |
| 58 | .Nm Tip |
| 59 | and |
| 60 | .Ar cu |
| 61 | establish a full-duplex connection to another machine, |
| 62 | giving the appearance of being logged in directly on the |
| 63 | remote cpu. It goes without saying that you must have a login |
| 64 | on the machine (or equivalent) to which you wish to connect. |
| 65 | The preferred interface is |
| 66 | .Nm tip . |
| 67 | The |
| 68 | .Ar cu |
| 69 | interface is included for those people attached to the |
| 70 | ``call |
| 71 | .Ux Ns '' |
| 72 | command of version 7. This manual page |
| 73 | describes only |
| 74 | .Nm tip . |
| 75 | .Pp |
| 76 | Available Option: |
| 77 | .Bl -tag -width indent |
| 78 | .It Fl v |
| 79 | Set verbose mode. |
| 80 | .El |
| 81 | .Pp |
| 82 | Typed characters are normally transmitted directly to the remote |
| 83 | machine (which does the echoing as well). A tilde (`~') appearing |
| 84 | as the first character of a line is an escape signal; the following |
| 85 | are recognized: |
| 86 | .Bl -tag -width flag |
| 87 | .It Ic \&~^D No or Ic \&~ . |
| 88 | Drop the connection and exit |
| 89 | (you may still be logged in on the |
| 90 | remote machine). |
| 91 | .It Ic \&~c Op Ar name |
| 92 | Change directory to |
| 93 | .Ar name |
| 94 | (no argument |
| 95 | implies change to your home directory). |
| 96 | .It Ic \&~! |
| 97 | Escape to a shell (exiting the shell will |
| 98 | return you to tip). |
| 99 | .It Ic \&~> |
| 100 | Copy file from local to remote. |
| 101 | .Nm Tip |
| 102 | prompts for the name of a local file to transmit. |
| 103 | .It Ic \&~< |
| 104 | Copy file from remote to local. |
| 105 | .Nm Tip |
| 106 | prompts first for the name of the file to be sent, then for |
| 107 | a command to be executed on the remote machine. |
| 108 | .It Ic \&~p Ar from Op Ar to |
| 109 | Send a file to a remote |
| 110 | .Ux |
| 111 | host. The put command causes the remote |
| 112 | .Ux |
| 113 | system to run the command string ``cat > 'to''', while |
| 114 | .Nm tip |
| 115 | sends it the ``from'' |
| 116 | file. If the ``to'' file isn't specified the ``from'' file name is used. |
| 117 | This command is actually a |
| 118 | .Ux |
| 119 | specific version of the ``~>'' command. |
| 120 | .It Ic \&~t Ar from Op Ar to |
| 121 | Take a file from a remote |
| 122 | .Ux |
| 123 | host. |
| 124 | As in the put command the ``to'' file |
| 125 | defaults to the ``from'' file name if it isn't specified. |
| 126 | The remote host |
| 127 | executes the command string ``cat 'from';echo ^A'' to send the file to |
| 128 | .Nm tip . |
| 129 | .It Ic \&~ |
| 130 | Pipe the output from a remote command to a local |
| 131 | .Ux |
| 132 | process. |
| 133 | The command string sent to the local |
| 134 | .Ux |
| 135 | system is processed by the shell. |
| 136 | .It Ic \&~$ |
| 137 | Pipe the output from a local |
| 138 | .Ux |
| 139 | process to the remote host. |
| 140 | The command string sent to the local |
| 141 | .Ux |
| 142 | system is processed by the shell. |
| 143 | .It Ic \&~# |
| 144 | Send a |
| 145 | .Dv BREAK |
| 146 | to the remote system. |
| 147 | For systems which don't support the |
| 148 | necessary |
| 149 | .Ar ioctl |
| 150 | call the break is simulated by a sequence of line speed changes |
| 151 | and |
| 152 | .Dv DEL |
| 153 | characters. |
| 154 | .It Ic \&~s |
| 155 | Set a variable (see the discussion below). |
| 156 | .It Ic \&~^Z |
| 157 | Stop |
| 158 | .Nm tip |
| 159 | (only available with job control). |
| 160 | .It Ic \&~^Y |
| 161 | Stop only the ``local side'' of |
| 162 | .Nm tip |
| 163 | (only available with job control); |
| 164 | the ``remote side'' of |
| 165 | .Nm tip , |
| 166 | the side that displays output from the remote host, is left running. |
| 167 | .It Ic \&~? |
| 168 | Get a summary of the tilde escapes |
| 169 | .El |
| 170 | .Pp |
| 171 | .Nm Tip |
| 172 | uses the file |
| 173 | .Pa /etc/remote |
| 174 | to find how to reach a particular |
| 175 | system and to find out how it should operate while talking |
| 176 | to the system; |
| 177 | refer to |
| 178 | .Xr remote 5 |
| 179 | for a full description. |
| 180 | Each system has a default baud rate with which to |
| 181 | establish a connection. If this value is not suitable, the baud rate |
| 182 | to be used may be specified on the command line, e.g. |
| 183 | .Ql "tip -300 mds" . |
| 184 | .Pp |
| 185 | When |
| 186 | .Nm tip |
| 187 | establishes a connection it sends out a |
| 188 | connection message to the remote system; the default value, if any, |
| 189 | is defined in |
| 190 | .Pa /etc/remote |
| 191 | (see |
| 192 | .Xr remote 5 ) . |
| 193 | .Pp |
| 194 | When |
| 195 | .Nm tip |
| 196 | prompts for an argument (e.g. during setup of |
| 197 | a file transfer) the line typed may be edited with the standard |
| 198 | erase and kill characters. A null line in response to a prompt, |
| 199 | or an interrupt, will abort the dialogue and return you to the |
| 200 | remote machine. |
| 201 | .Pp |
| 202 | .Nm Tip |
| 203 | guards against multiple users connecting to a remote system |
| 204 | by opening modems and terminal lines with exclusive access, |
| 205 | and by honoring the locking protocol used by |
| 206 | .Xr uucp 1 . |
| 207 | .Pp |
| 208 | During file transfers |
| 209 | .Nm tip |
| 210 | provides a running count of the number of lines transferred. |
| 211 | When using the ~> and ~< commands, the ``eofread'' and ``eofwrite'' |
| 212 | variables are used to recognize end-of-file when reading, and |
| 213 | specify end-of-file when writing (see below). File transfers |
| 214 | normally depend on tandem mode for flow control. If the remote |
| 215 | system does not support tandem mode, ``echocheck'' may be set |
| 216 | to indicate |
| 217 | .Nm tip |
| 218 | should synchronize with the remote system on the echo of each |
| 219 | transmitted character. |
| 220 | .Pp |
| 221 | When |
| 222 | .Nm tip |
| 223 | must dial a phone number to connect to a system it will print |
| 224 | various messages indicating its actions. |
| 225 | .Nm Tip |
| 226 | supports the |
| 227 | .Tn DEC DN Ns-11 |
| 228 | and |
| 229 | Racal-Vadic 831 auto-call-units; |
| 230 | the |
| 231 | .Tn DEC DF Ns \&02 |
| 232 | and |
| 233 | .Tn DF Ns \&03 , |
| 234 | Ventel 212+, Racal-Vadic 3451, and |
| 235 | Bizcomp 1031 and 1032 integral call unit/modems. |
| 236 | .Ss VARIABLES |
| 237 | .Nm Tip |
| 238 | maintains a set of |
| 239 | .Ar variables |
| 240 | which control its operation. |
| 241 | Some of these variable are read-only to normal users (root is allowed |
| 242 | to change anything of interest). Variables may be displayed |
| 243 | and set through the ``s'' escape. The syntax for variables is patterned |
| 244 | after |
| 245 | .Xr vi 1 |
| 246 | and |
| 247 | .Xr Mail 1 . |
| 248 | Supplying ``all'' |
| 249 | as an argument to the set command displays all variables readable by |
| 250 | the user. Alternatively, the user may request display of a particular |
| 251 | variable by attaching a `?' to the end. For example ``escape?'' |
| 252 | displays the current escape character. |
| 253 | .Pp |
| 254 | Variables are numeric, string, character, or boolean values. Boolean |
| 255 | variables are set merely by specifying their name; they may be reset |
| 256 | by prepending a `!' to the name. Other variable types are set by |
| 257 | concatenating an `=' and the value. The entire assignment must not |
| 258 | have any blanks in it. A single set command may be used to interrogate |
| 259 | as well as set a number of variables. |
| 260 | Variables may be initialized at run time by placing set commands |
| 261 | (without the ``~s'' prefix in a file |
| 262 | .Pa .tiprc |
| 263 | in one's home directory). The |
| 264 | .Fl v |
| 265 | option causes |
| 266 | .Nm tip |
| 267 | to display the sets as they are made. |
| 268 | Certain common variables have abbreviations. |
| 269 | The following is a list of common variables, |
| 270 | their abbreviations, and their default values. |
| 271 | .Bl -tag -width Ar |
| 272 | .It Ar beautify |
| 273 | (bool) Discard unprintable characters when a session is being scripted; |
| 274 | abbreviated |
| 275 | .Ar be . |
| 276 | .It Ar baudrate |
| 277 | (num) The baud rate at which the connection was established; |
| 278 | abbreviated |
| 279 | .Ar ba . |
| 280 | .It Ar dialtimeout |
| 281 | (num) When dialing a phone number, the time (in seconds) |
| 282 | to wait for a connection to be established; abbreviated |
| 283 | .Ar dial . |
| 284 | .It Ar echocheck |
| 285 | (bool) Synchronize with the remote host during file transfer by |
| 286 | waiting for the echo of the last character transmitted; default is |
| 287 | .Ar off . |
| 288 | .It Ar eofread |
| 289 | (str) The set of characters which signify and end-of-tranmission |
| 290 | during a ~< file transfer command; abbreviated |
| 291 | .Ar eofr . |
| 292 | .It Ar eofwrite |
| 293 | (str) The string sent to indicate end-of-transmission during |
| 294 | a ~> file transfer command; abbreviated |
| 295 | .Ar eofw . |
| 296 | .It Ar eol |
| 297 | (str) The set of characters which indicate an end-of-line. |
| 298 | .Nm Tip |
| 299 | will recognize escape characters only after an end-of-line. |
| 300 | .It Ar escape |
| 301 | (char) The command prefix (escape) character; abbreviated |
| 302 | .Ar es ; |
| 303 | default value is `~'. |
| 304 | .It Ar exceptions |
| 305 | (str) The set of characters which should not be discarded |
| 306 | due to the beautification switch; abbreviated |
| 307 | .Ar ex ; |
| 308 | default value is ``\et\en\ef\eb''. |
| 309 | .It Ar force |
| 310 | (char) The character used to force literal data transmission; |
| 311 | abbreviated |
| 312 | .Ar fo ; |
| 313 | default value is `^P'. |
| 314 | .It Ar framesize |
| 315 | (num) The amount of data (in bytes) to buffer between file system |
| 316 | writes when receiving files; abbreviated |
| 317 | .Ar fr . |
| 318 | .It Ar host |
| 319 | (str) The name of the host to which you are connected; abbreviated |
| 320 | .Ar ho . |
| 321 | .It Ar prompt |
| 322 | (char) The character which indicates and end-of-line on the remote |
| 323 | host; abbreviated |
| 324 | .Ar pr ; |
| 325 | default value is `\en'. This value is used to synchronize during |
| 326 | data transfers. The count of lines transferred during a file transfer |
| 327 | command is based on recipt of this character. |
| 328 | .It Ar raise |
| 329 | (bool) Upper case mapping mode; abbreviated |
| 330 | .Ar ra ; |
| 331 | default value is |
| 332 | .Ar off . |
| 333 | When this mode is enabled, all lower case letters will be mapped to |
| 334 | upper case by |
| 335 | .Nm tip |
| 336 | for transmission to the remote machine. |
| 337 | .It Ar raisechar |
| 338 | (char) The input character used to toggle upper case mapping mode; |
| 339 | abbreviated |
| 340 | .Ar rc ; |
| 341 | default value is `^A'. |
| 342 | .It Ar record |
| 343 | (str) The name of the file in which a session script is recorded; |
| 344 | abbreviated |
| 345 | .Ar rec ; |
| 346 | default value is ``tip.record''. |
| 347 | .It Ar script |
| 348 | (bool) Session scripting mode; abbreviated |
| 349 | .Ar sc ; |
| 350 | default is |
| 351 | .Ar off . |
| 352 | When |
| 353 | .Ar script |
| 354 | is |
| 355 | .Li true , |
| 356 | .Nm tip |
| 357 | will record everything transmitted by the remote machine in |
| 358 | the script record file specified in |
| 359 | .Ar record . |
| 360 | If the |
| 361 | .Ar beautify |
| 362 | switch is on, only printable |
| 363 | .Tn ASCII |
| 364 | characters will be included in |
| 365 | the script file (those characters betwee 040 and 0177). The |
| 366 | variable |
| 367 | .Ar exceptions |
| 368 | is used to indicate characters which are an exception to the normal |
| 369 | beautification rules. |
| 370 | .It Ar tabexpand |
| 371 | (bool) Expand tabs to spaces during file transfers; abbreviated |
| 372 | .Ar tab ; |
| 373 | default value is |
| 374 | .Ar false . |
| 375 | Each tab is expanded to 8 spaces. |
| 376 | .It Ar verbose |
| 377 | (bool) Verbose mode; abbreviated |
| 378 | .Ar verb ; |
| 379 | default is |
| 380 | .Ar true . |
| 381 | When verbose mode is enabled, |
| 382 | .Nm tip |
| 383 | prints messages while dialing, shows the current number |
| 384 | of lines transferred during a file transfer operations, |
| 385 | and more. |
| 386 | .El |
| 387 | .Sh ENVIRONMENT |
| 388 | .Nm Tip |
| 389 | uses the following environment variables: |
| 390 | .Bl -tag -width Fl |
| 391 | .It Ev SHELL |
| 392 | (str) The name of the shell to use for the ~! command; default |
| 393 | value is ``/bin/sh'', or taken from the environment. |
| 394 | .It Ev HOME |
| 395 | (str) The home directory to use for the ~c command; default |
| 396 | value is taken from the environment. |
| 397 | .It Ev HOST |
| 398 | Check for a default host if none specified. |
| 399 | .El |
| 400 | .Pp |
| 401 | The variables |
| 402 | .Ev ${REMOTE} |
| 403 | and |
| 404 | .Ev ${PHONES} |
| 405 | are also exported. |
| 406 | .Sh FILES |
| 407 | .Bl -tag -width /var/spool/uucp/LCK..* -compact |
| 408 | .It Pa /etc/remote |
| 409 | Global system descriptions. |
| 410 | .It Pa /etc/phones |
| 411 | Global phone number data base. |
| 412 | .It ${REMOTE} |
| 413 | Private system descriptions. |
| 414 | .It ${PHONES} |
| 415 | Private phone numbers. |
| 416 | .It ~/.tiprc |
| 417 | Initialization file. |
| 418 | .It Pa tip.record |
| 419 | Record file. |
| 420 | .It /var/log/aculog |
| 421 | Line access log. |
| 422 | .It Pa /var/spool/uucp/LCK..* |
| 423 | Lock file to avoid conflicts with |
| 424 | .Xr uucp . |
| 425 | .El |
| 426 | .Sh DIAGNOSTICS |
| 427 | Diagnostics are, hopefully, self explanatory. |
| 428 | .Sh SEE ALSO |
| 429 | .Xr remote 5 , |
| 430 | .Xr phones 5 |
| 431 | .Sh HISTORY |
| 432 | The |
| 433 | .Nm tip |
| 434 | appeared command in |
| 435 | .Bx 4.2 . |
| 436 | .Sh BUGS |
| 437 | The full set of variables is undocumented and should, probably, be |
| 438 | paired down. |