Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ kermit(1) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cu(1)

tar(1)

uucp(1)

KERMIT(1)

NAME

kermit − kermit file transfer

SYNOPSIS

kermit [options] [file]

DESCRIPTION

Kermit is a file transfer program for moving files between many machines of different operating systems and architectures. 

Arguments are optional. If kermit is executed without arguments, it enters command mode. Otherwise, kermit parses the arguments from the command line and interprets them. 

The following terms are used in the command descriptions that follow:

fn HP-UX file specification, possibly containing the "wildcard" characters ’*’ or ’?’ (’*’ matches all character strings, ’?’ matches any single character). 

fn1 HP-UX file specification which must not contain ’*’ or ’?’. 

rfn Remote file specification in the remote system’s own syntax.  May denote a single file or a group of files. 

rfn1 Remote file specification which should denote only a single file. 

n Decimal number between 0 and 94. 

c Decimal number between 0 and 127 representing the value of an ASCII character. 

cc Decimal number ranging from 0 through 31 or exactly 127, which represents the value of an ASCII control character. 

[ ] Any field in square braces is optional. 

{x|y|z} Alternatives are listed in curly braces. 

Kermit command line options can specify either actions or settings.  If kermit is invoked with a command line that specifies no actions, it will issue a prompt and begin interactive dialogue.  Action options specify either protocol transactions or terminal connection. 

The command line must contain no more than one protocol action option. 

Action Options

−s fn Send the specified file or files. If fn contains wildcard (meta) characters the HP-UX shell will expand it into a list.  If fn is "−" then kermit sends from standard input, which must come from a file:

kermit −s − < foo.bar

or a pipeline:

ls -l | kermit −s −

This mechanism will not work to send terminal typein.  If you want to send a file whose name is "−" you can precede it with a path name, as in

kermit −s ./−

−r Receive a file or files.  Wait passively for files to arrive. 

−k Receive (passively) a file or files, sending them to standard output.  This option can be used in several ways:

kermit −k

Displays the incoming files on your terminal; to be used only in "local mode" (see below). 

kermit −k > fn1

Sends the incoming file or files to the named file, fn1.  If more than one file arrives, all are concatenated together into the single file fn1. 

kermit −k | command

Pipes the incoming data (single or multiple files) to the indicated command, as in

kermit −k | sort > sorted.stuff

−a fn1 If you have specified a file transfer option, you may specify an alternate name for a single file with the −a option.  For example,

kermit −s foo −a bar

sends the file foo telling the receiver that its name is bar.  If more than one file arrives or is sent, only the first file is affected by the −a option:

kermit −ra baz

stores the first incoming file under the name baz. 

−x Begin server operation.  May be used in either local or remote mode. 

Setting Options

−l dev Line — Specify a terminal line to use for file transfer and terminal connection, as in

kermit −l /dev/tty1p4

The −l option places kermit in "local" mode (see below). 

When an external line is being used, you might also need some additional options for successful communication with the remote system:

−b n Set Baud Rate — Specify the baud rate for the line given in the −l option, as in

kermit −l /dev/tty1p4 −b 9600

This option should always be included with the −l option, since the speed of an external line is not necessarily what you expect. 

−p x Set Parity — e, o, m, s, n (even, odd, mark, space, or none).  If parity is other than none, then the 8th-bit prefixing mechanism will be used for transferring 8-bit binary data, provided the opposite kermit agrees. The default parity is none. 

−t Specifies half duplex, line turnaround with XON as the handshake character. 

The following commands may be used only with a kermit which is local — either by default or because the −l option has been specified. 

−g rfn Actively request a remote server to send the named file or files; rfn is a file specification in the remote host’s own syntax.  If rfn happens to contain any special shell characters, like ’*’, these must be quoted, as in:

kermit −g x\*.\? 

−f Send a "finish" command to a remote server. 

−c Establish a terminal connection over the specified or default communication line, before any protocol transaction takes place.  Control can be returned to the local system by typing the escape character (normally Control-Backslash) followed by the letter "c". 

−n Like −c, but connect after a protocol transaction takes place.  The use of −n and −c is illustrated below. 

kermit −l /dev/tty0p4 −b 9600 −c

Causes kermit to connect through /dev/tty0p4 at 9600 baud. 

kermit −l /dev/tty0p4 −b 9600 −rn

Causes kermit to wait for a file to be received, then connects through /dev/tty0p4 at 9600 baud. 

On a timesharing system, the −l and −b options will also have to be included with the −r,−k, or −s options if the other kermit is on a remote system. 

If kermit is in local mode, the standard output is continuously updated to show the progress of the file transfer.  A dot (".") is printed for every four data packets, other packets are shown by type  (e.g.  ’S’  for  Send-Init),  ’T’  is printed  when a timeout occurs , and ’%’ is printed for each retransmission.  In addition, you may type certain "interrupt" commands during file transfer.  These commands must be preceded by the escape character (by default, control-\). 

Control-F:  Interrupt the current File, and go on to the next (if any). 

Control-B:  Interrupt the entire Batch of files, terminate the transaction. 

Control-R:  Resend the current packet

Control-A:  Display a status report for the current transaction. 

Several other command-line options are provided:

−i Specifies that files should be sent or received exactly "as is" with no conversions.  This option is necessary for transmitting binary files.  It may also be used to slightly boost efficiency in HP-UX to HP-UX transfers of text files by eliminating CRLF/newline conversion. 

−w Write-Protect — Avoid filename collisions for incoming files. 

−q Quiet — Suppress screen update during file transfer, for instance to allow a file transfer to proceed in the background. 

−d Debug — Record debugging information in the file debug.log in the current directory. 

−h Help — Display a brief synopsis of the command line options. 

Local vs. Remote Mode

Kermit is "local" if it is running on a PC or workstation that you are using directly, or if it is running on a multiuser system and transferring files over an external communication line — not your job’s controlling terminal or console.  Kermit is remote if it is running on a multiuser system and transferring files over its own controlling terminal’s communication line, connected to your PC or workstation. 

If you are running kermit on a PC, it is in local mode by default, with the "back port" designated for file transfer and terminal connection.  If you are running kermit on a multiuser (timesharing) system, it is in remote mode unless you explicitly point it at an external line for file transfer or terminal connection with the −l option. 

Interactive operation

Kermit’s interactive command prompt is "C-Kermit>".  In response to this prompt, you may type any valid command.  Kermit executes the command and then prompts you for another command.  The process continues until you instruct the program to terminate. 

Commands begin with a keyword, normally a verb, such as "send".  You may omit trailing characters from any keyword, so long as you specify sufficient characters to distinguish it from any other keyword valid in that field.  Certain commonly-used keywords (such as "send", "receive", "connect") have special non-unique abbreviations ("s" for "send", "r" for "receive", "c" for "connect"). 

Certain characters have special functions in interactive commands:

?  Question mark, typed at any point in a command, will produce a message explaining what is possible or expected at that point.  Depending on the context, the message may be a brief phrase, a menu of keywords, or a list of files. 

ESC (The Escape key) — Request completion of the current keyword or filename, or insertion of a default value.  The result will be a beep if the requested operation fails due to multiple matches. 

DEL, BS (The Delete or Rubout key, Backspace or control-H) — Delete the previous character from the command. 

^W (Control-W) — Erase the rightmost word from the command line. 

^U (Control-U) — Erase the entire command. 

^R (Control-R) — Redisplay the current command. 

SP, TAB (Space, Horizontal tab) — Delimits fields (keywords, filenames, numbers) within a command. 

CR, LF, FF (Carriage Return, Linefeed, Formfeed) — Enters the command for execution. 

\ (Backslash) — Enter any of the above characters into the command, literally. To enter a backslash, type two backslashes in a row (\\). 

You  may  type  the editing characters (DEL, ^W, etc) repeatedly, to delete all the way back to the prompt.  No action will be performed until the command is entered by typing carriage return, linefeed, or formfeed.  If you make any mistakes you will receive an informative error message and a new prompt will be displayed.  Make liberal use of ’?’ and ESC to feel your way through the commands.  One important command is help — you should use it the first time you run kermit. 

Interactive kermit accepts commands from files as well as from the  keyboard.  When you enter interactive mode, kermit looks for the file .kermrc in your home or current directory (first it looks in the home directory, then in the current one) and executes any commands it finds there.  These commands must be in interactive format, not HP-UX command-line format.  A take command is also provided to execute commands from a file at any time during an interactive session.  Command files may be nested to any reasonable depth. 

Here is a brief list of kermit interactive commands:

! command Execute the HP-UX shell command command. 

bye Terminate and log out a remote kermit server. 

close log_file Close a log file.  Log_file is one of the following: debugging, packets, session, or transactions. 

connect Establish a terminal connection to a remote system as if it were a local terminal to that computer.  The connection is made through the device specified in the most recent set line command.  All characters you type at your keyboard are sent out the communication line, all characters arriving at the communication port are displayed on your terminal.  Current settings of speed, parity, duplex, and flow control are honored.  If you have issued a log session command, everything you see on your terminal will also be recorded to your session log.  This provides a way to "capture" files from systems that don’t have kermit programs available. 

To get back to your own system, you must type the escape character, which is FS (control-\, ASCII 28) unless you have changed it with the set escape command, followed by a single character command, such as "c" for "close connection".  The recognized single character commands are:

cClose the connection. 

bSend a BREAK signal to remote machine. 

0(zero) Send a NUL character. 

sGive a status report about the connection. 

^\Send control-\ itself (whatever you have defined the escape character to be, typed twice in a row sends one copy of it). 

cwd dir Change Working Directory.  Changes the current working directory to dir. 

dial number Dial a telephone number.  Tells the modem to dial the number num.  Kermit must be told what type of modem is being used (see set command below). 

directory dir ...
Display a directory listing.

echo arg ... Display arguments literally. 

exit Exit from the program, closing any open logs. 

finish Instruct a remote kermit server to exit, but not log out. 

get [ file [ dname ] ]
Get files from a remote kermit server.  File may contain wildcard characters.  If dname is specified, the first incoming file will be stored under that name. 

Since a remote file specification (or list) might contain spaces, which normally delimit fields of a kermit command, an alternate form of the command is provided to allow the inbound file to be given a new name: entering get alone on a line, and kermit will prompt separately for the remote and local file specifications.  For example:

C-Kermit>get
Remote file specification: foo
Local name to store it under: bar

help [topic] Display a help message for a given command. 

log log_file file_name
Open a log file with name file_name.  Log_file must be one of the following: debugging, packet, session, or transaction. 

quit Same as exit. 

receive [ dname ]
Passively wait for files to arrive. If dname is specified, kermit will store the first incoming file under that name.  The receive command may be abbreviated to r. 

remote Issue file management commands to a remote kermit server.  The valid remote commands are:

cwd dir Change remote working directory. 

delete file ... Delete remote files. 

directory dir ...
Display a listing of remote file names.

help [topic] Request help from a remote server. 

host command Issue a command to the remote host in its own command language. 

space Display current disk space usage on remote system. 

type file Display a remote file on your screen. 

who [user] Display who’s logged in, or get information about a user. 

script text Login to the remote system using the text provided.  The login script is intended to operate similarly to uucp Systems entries.  A login script is a sequence of the form:

expect send [ expect send ] ... 

where expect is a prompt or message to be issued by the remote site, and send is the data to return to the remote host.  Send may also be "EOT" to send control-d, or BREAK to send a break.  Letters in send may be prefixed by "~" to send special characters.  These are: ~b for backspace, ~s for space, ~q for "?", ~n for linefeed, ~r for return, ~c for don’t append a return, and ~### (### are octal digits) for octal of a character.  As with some uucp systems, sent strings are followed by ~r unless they end with ~c. 

Only the last 7 characters in each expect are matched.  A null expect, e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect that a sequence might not arrive, as with uucp, conditional sequences may be expressed in the form:

−send-expect[−send-expect[...]]

where dashed sequences are followed as long as previous expects fail. 

send file [ dname ]
Send files. Send the file of files specified by file to the other kermit, which should be running as a server, or which should be given the receive command.  Each file is sent under its own name (or converted as specified by the set names command).  The send command may be abbreviated to s even though "s" is not a unique abbreviation for a top-level kermit command. 

The wildcard characters "*" and "?" are accepted in file.  If "?" is to be included, it must be prefixed by "\" to override its normal function of providing help.  "*" matches any string, "?" matches any single character.  Other notations for file groups, like "[a−z]og", are not available in interactive commands.  When file contains wildcard characters, there is a limit to the number of files that can be matched, which varies from system to system.  If you get the message "Too many files match" then you will have to make a more judicious selection. 

Kermit does not skip over "invisible" files that match the file specification.  HP-UX systems usually treat files whose names start with a dot (like .login, .profile, and .kermrc) as invisible. 

If dname is specified, file must not contain any wildcard characters and dname specifies the name to send it under. 

Note: kermit sends only from the current or specified directory.  It does not traverse directory trees.  If the source directory contains subdirectories, they will be skipped.  Conversely, kermit does not create directories when receiving files.  If you need to do this, you can pipe tar(1) through kermit. For example, on the origination system, type:

tar cf − /usr/src | kermit −is −

This causes tar to send the directory /usr/src (and all files in its subdirectories) to standard output.  Kermit receives the standard input and sends it as a binary file.  On the receiving system type:

kermit −il /dev/tty1p3 −b 9600 −k | tar xf −

This causes kermit to receive the tar archive and sends it via standard output to its own copy of tar, which extracts from it a replica of the original directory tree. 

server Begin server operation.  Places the local kermit into server mode.  All further commands must arrive as valid kermit packets from the kermit on the other end of the line.  The HP-UX kermit server can respond to the following commands:

getSends files. 

sendReceives files. 

byeAttempts to log itself out. 

finishExits the server mode. 

remote directorySends directory listing. 

remote deleteRemoves files. 

remote cwdChanges working directory. 

remote typeSends files to your screen. 

remote spaceReports about its disk usage. 

remote whoShows who’s logged in. 

remote hostExecutes an HP-UX shell command. 

remote helpLists these capabilities. 

set Set various parameters.  The "set" parameters are:

block-check { 1 | 2 | 3 }
Level of packet error detection. 1 is a single character 6-bit checksum, folded to included the values of all bits from each character.  2 is a 2 character 12-bit checksum.  3 is a 3 character 16-bit cyclic redundancy check (CRC).  The higher the block check, the better the error detection and correction and the higher the resulting overhead.  Type 1 is most commonly used; it is supported by all kermit implementations, and has proven adequate in most circumstances.  Types 2 or 3 would be used to advantage when transferring 8-bit binary files over noisy lines. 

delay n How long to wait before sending first packet.  N is specified in seconds. 

duplex { full | half }
Specify which side echoes during "connect". Full means the other side, half means the local kermit must echo typein itself. 

escape-character cc
Character to prefix "escape commands" during "connect". The escape character is also used to prefix interrupt commands during file transfers. The default value is 28 (control backslash).

file param Set various file parameters.  Valid values for param are:

display { on | off }
Normally on.  When in local mode, display progress of file transfers to the standard output, and listen to the standard input for interruptions.  If off (also settable by −p on the kermit invocation line), none of this is done. 

names { converted | literal }
Normally converted, which means that outbound file names have path specifications stripped, lowercase letters upshifted, tildes and extra periods changed to "X"’s and an "X" inserted in front of any name that starts with period.  Incoming files have uppercase letters downshifted.  Literal means none of these conversions are done.  When using literal naming, the sender should not use path names in the file specification unless the same path exists on the target system and is writable. 

type { binary | text }
Normally text, which means that conversion is done between HP-UX newline characters and the carriage return/linefeed sequences required by the canonical kermit file transmission format, and in common use on non-HP-UX systems.  Binary means to transmit file contents without conversion.  Binary is necessary for binary file transmission and is desirable in all HP-UX to HP-UX transactions to cut down on overhead. 

warning { on | off }
Normally off, which means that incoming files will silently overwrite existing files of the same name.  When on, kermit will check of an arriving file would overwrite an existing file.  If so, it will construct a new name for the arriving file of the form file~n, where file is the name they share and n is a generation number.  For example if foo exists, then the new file will be called foo~1.  If foo and foo~1 exist, the new file will be foo~2, and so on. 

flow-control { none | xon/xoff }
Communication line full-duplex flow control. Normally xon/xoff for full duplex flow control.  Should be set to none if the other system cannot do XON/XOFF flow control. 

handshake { xon | xoff | cr | lf | bell | esc | none }
Normally none.  Otherwise half duplex communication line turnaround handshaking is done, which means kermit will not reply to a packet until it has received the indicated handshake character or has timed out waiting for it. 

line [ device] Communication line device name.  If you specify a device name, kermit will be in local mode and you should remember to issue any other necessary set commands, such as set speed.  If you omit the device name, kermit will revert to its default mode of operation. 

modem-dialer { direct | hayes | ventel }
Type of modem-dialer on communication line. Direct indicates either there is no dialout modem, or that if the line requires carrier detection to open, then set line will hang waiting for an incoming call.  Hayes and ventel indicate that the subsequent set line will prepare for a subsequent dial command for Hayes and Ventel dialers, respectively.  kermit does not need to have incoming packets preceded kermit to request the other kermit to

parity { even | odd | mark | space | none }
Communication line character parity. If other than none, kermit will seek to use the 8th bit prefixing mechanism for transferring 8-bit binary data, which can be used successfully only if the other kermit agrees. 

prompt [ string]
Change the kermit program’s prompt.  If string is given, the prompt will be set to string.  If string is omitted, the prompt will revert to the default "C−Kermit>". 

receive parameter value
Parameters to request or inspect for incoming packets, as follows:

end-of-line cc
Normally carriage return (15) by default. 

packet-length number
Maximum length packet for the other side to send; a decimal number between 10 and 94. Shorter packet lengths can be used on noisy lines, or with systems, front ends, or networks that have small buffers. The shorter the packet, the higher the overhead, but the lower the chance of a packet being corrupted by noise, and the less time to retransmit the corrupted packets.

timeout number
How many seconds the other Kermit should wait for a packet before asking for retransmission.

pad-character cc
Character to use for inter-packet padding. Normally kermit does not need to have incoming packets preceded by pad characters.  This command allows kermit to request the other kermit to use cc as a pad character.  Default of NUL (ASCII 0).  No kermits are known to need padding, and if one did, it would request it without your having to tell it to do so. 

padding number
How many padding characters to request before each incoming packet.

start-of-packet cc
Set control character to mark beginning of incoming packets. The kermit packet prefix character is SOH (control-A).  The only reasons it would ever be changed would be: Some piece of equipment somewhere between the two kermit programs will not pass SOH, or some piece of equipment similarly placed is echoing its input.  In the latter case, the recipient of such an echo can change the packet prefix for outbound packets, so that the echoed packets will be ignored.  The opposite kermit must also be told to change the prefix for its inbound packets. 

send parameter value
Establish paramters for outgoing packets.  This command is generally used to override negotiated values, or to establish before negotiation takes place.

end-of-line cc
The ASCII character to be used as a line terminator for outbound packets, if one is required by the other system.  Normally carriage return (15) by default.  You will only have to use this command for systems that require a line terminator other than carriage return. 

packet-lenght number
Maximum lenght packet  to send, decimal number, between 10 and 94, decimal.  Shorter packet lengths can be used on noisy lines, or with systems or front ends or networks that have small buffers. The shorter the packet, the higher the overhead, but the lower the chance of a packet being corrupted by noise, and the less time to retransmit the corrupted packets. This command can be used to specify a shorter lenght than the one requested by the other kermit, but not a longer one.

timeout number
How many seconds to  wait for a packet before asking for trying again. A value of zero means do not time out, wait forever.

pad-character cc
Character to use for inter-packet padding. Default of NUL (ASCII 0).

padding number
How many padding characters to send before a packet. Defaults are no padding.

start-of-packet cc
Set control character to mark start of packets. The kermit packet prefix character is SOH (control-A).  The only reasons it would ever be changed would be: Some piece of equipment somewhere between the two kermit programs will not pass SOH; or, some piece of equipment similarly placed is echoing its input.  The opposite kermit must also be told to change the prefix for its inbound packets. 

speed { 0 | 110 | 300 | 600 | 1200 | 1800 | 2400 | 4800 | 9600 }
Set communication line speed. This command cannot be used to change the speed of your own console terminal. Normally, you must use this command after a set line before you can use the line.  kermit packet prefix character is SOH (control-A).  kermit programs will not kermit must also be told to change the prefix for kermit presently can be told to change only its outbound kermit partner sets its packet timeout interval kermit requests.  kermit will wait forever for expected packets to arrive. 

show { parameters | versions }
If show parameters is entered, kermit will display the values of all the set parameters described above.  If show versions is entered, kermit will display the version numbers and dates of all its interval modules. 

space Display current disk space usage. 

statistics Display statistics about most recent kermit protocol transaction including file and communication line I/O, as well as what encoding options were in effect (such as 8th-bit prefixing, repeat-count compression, etc.). 

take file Execute commands from file.  File may contain any interactive kermit commands, including take.  Command files may be nested to any reasonable depth.  The echo command may be used within command files to issue greetings, announce progress, etc. 

Command files are in exactly the same syntax as interactive commands.  Note that this implies that if you want to include special characters like "?" or "\" you have to quote these characters the same way as when typing interactive commands. 

Command files may be used in lieu of command macros, which have not been implemented in this version of kermit. For example, if you commonly connect to a system called "B" that is connected to tty1p3 at 4800 baud, you could create a file called b that contains the commands:

set line /dev/tty1p3
set speed 4800
echo Connecting to System B...
connect

and then simply type "take b" (or "t b" since no other commands begin with the letter "t") whenever you wish to connect to system B. 

An implicit take command is executed upon your .kermrc file upon kermit’s initial entry into interactive dialog. The .kermrc file should contain set or other commands you want to be in effect at all times.  For instance, you might want to override the default action when incoming files have the same names as existing files — in that case, put the command

set file warning on

in your .kermrc file. 

DIAGNOSTICS

The diagnostics produced by kermit itself are intended to be self-explanatory. 

WARNINGS

File renaming: When filename collision avoidance ("set file warning") is selected, kermit constructs unique names by appending a generation number to the end of the file name.  Currently, no checking is done to ensure that the result is still within the maximum length for a file name. 

UUCP line locking: kermit locks lines, to prevent uucp and multiuser conflicts, when it first opens a communications line.  This occurs either when a set line is issued of if the −l argument is used, when the first dial, connect, or protocol operation occurs.  The lock is released if another set line is issued, or if the program quits, exits, or is terminated by SIGINT.  If a user connects and returns to the shell command level, for example to initiate kermit by piped commands, the line lock is released when returning to the shell.  Locking is not needed, or used, if communication occur over the local terminal line (e.g. /dev/tty).  In that case, there is no difficulty with piped operations releasing locks and lines. 

Removing stale lock files: For various reasons, lock files sometimes get left after uucp or kermit activities.  (The most common reason is that the uucp or kermit activity was killed by a shell command.)  Uucp supports a function called uuclean which is customarily used to remove these files after a predetermined age.  If in doubt about a lock file on the dial-out line you need, contact your system administrator. 

Modem controls: If a connection is made over a communication line (rather than on the controlling terminal line), and that line has modem controls (e.g. data terminal ready and carrier detect implementations), returning to the shell will disconnect the conversation.  In that case, one should use interactive mode commands, and avoid use of piped shell-level operation. 

Resetting the terminal after abnormal termination of kill: When kermit terminates abnormally (say, for example, by a kill command issued by the operator) the user may need to reset the terminal state.  If commands do not seem to be accepted at the shell prompt, try typing "^J reset ^J".  That should take the terminal out of raw mode if it was stuck there. 

AUTHOR

The kermit protocol was developed by Columbia University.  Kermit is available for many systems for a nominal fee from Columbia and various user groups. 

FILES

/usr/bin/kermit $HOME/.kermrc

SEE ALSO

cu(1), tar(1), uucp(1)

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026