C-KERMIT (Part 3 of 10)
gregg at okstate.UUCP
gregg at okstate.UUCP
Fri Mar 8 17:44:00 AEST 1985
echo x - ckermi.doc part 1
sed '1,$s/^X//' <<\!FUNKY!STUFF! > ckermi.doc
X
X
X
X1. UNIX KERMIT
X
XProgram: Frank da Cruz, Bill Catchings, Jeff Damens, Columbia University;
X Herm Fischer, Litton Data Systems, Van Nuys CA; contributions by
X many others.
XLanguage: C
XDocumentation:
X Frank da Cruz, Columbia University; Herm Fischer, Litton Data Sys-
X tems, Van Nuys CA.
XVersion: 4.2
XDate: March 1985
X
X D R A F T
X
X NOTE -- This source for this documentation is written as input for the
X Scribe text formatter. It needs to become input for two text format-
X ters - Scribe and Nroff, the former for inclusion in the Kermit User
X Guide, and the latter for Unix man pages. This might be done by defin-
X ing formatting macros in M4, which generate the appropriate Scribe and
X Nroff commands for sectioning, itemization, description, etc.
X (Volunteers?)
X
XC-Kermit is a completely new implementation of Kermit, written modularly and
Xtransportably in C. The protocol state transition table is written in wart, a
X(not proprietary) lex-like preprocessor for C. System-dependent primitive func-
Xtions are isolated into separately compiled modules so that the program should
Xbe easily portable among Unix systems and also to non-Unix systems that have C
Xcompilers.
X
X
XUnix Kermit Capabilities At A Glance:
X
X Local operation: Yes
X Local operation: Yes
X Remote operation: Yes
X Login scripts: Yes
X Transfer text files: Yes
X Transfer binary files: Yes
X Wildcard send: Yes
X File transfer interruption: Yes
X Filename collision avoidance: Yes
X Can time out: Yes
X 8th-bit prefixing: Yes
X Repeat count prefixing: Yes
X Alternate block checks: Yes
X Terminal emulation: Yes
X Communication settings: Yes
X Transmit BREAK: Yes
X Support for dialout modems: Yes
X IBM mainframe communication: Yes
X Transaction logging: Yes
X Session logging: Yes
X Debug logging: Yes
X Packet logging: Yes
X Act as server: Yes
X Talk to server: Yes
X Advanced server functions: Yes
X Local file management: Yes
X Command/Init files: Yes
X UUCP and multiuser line locking: Yes
X File attributes: No
X Command macros: No
X Raw file transmit: No
X
XC-Kermit provides traditional Unix command line operation as well as inter-
Xactive command prompting and execution. The command line options provide ac-
Xcess to a minimal subset of C-Kermit's capabilities; the interactive command
Xset is far richer.
X
XOn systems with dialout modems, C-Kermit can use command files and login
Xscripts to essentially duplicate the file transfer functionality of uucp among
Xheterogeneous operating systems, including by the use of scheduled (e.g. late
Xnight) unattended operation.
X
X
X1.1. The Unix File System
X
XConsult your Unix manual for details about the file system under your version
Xof Unix. For the purposes of Kermit, several things are worth briefly noting.
XUnix files generally have lowercase names. Unix directories are tree-struc-
Xtured. Directory levels are separated by "/" characters. For example,
X
X /usr/foo/bar
X
Xdenotes the file bar in the directory /usr/foo. Wildcard or "meta" characters
Xallow groups of files to be specified. "*" matches any string; "?" matches any
Xsingle character.
X
XWhen C-Kermit is invoked with files specified on the Unix command line, the
XUnix shell (Bourne Shell, C-Shell, etc) expands meta characters, and in this
Xcase, a wider variety is available. For example,
X
X kermit -s ~/ck[x-z]*.[ch]
X
Xis expanded by the Berkeley C-Shell into a list of all the files in the user's
Xhome directory (~/) that start with the characters "ck", followed by a single
Xcharacter x, y, or z, followed by zero or more characters, followed by a dot,
Xfollowed by one of the characters c or h. Internally, the C-Kermit program it-
Xself expands only the "*" and "?" meta characters.
X
XUnix files are linear streams of 8-bit bytes. Text files consist of 7-bit AS-
XCII characters, with the high bit off (0), and lines separated by the Unix
Xnewline character, which is linefeed (LF, ASCII 10). This distinguishes Unix
Xtext files from those on most other ASCII systems, in which lines are separated
Xby a carriage-return linefeed sequence (CRLF, ASCII 13 followed by ASCII 10).
XBinary files are likely to contain data in the high bits of the file bytes, and
Xare not treated in terms of lines.
X
XWhen transferring files, C-Kermit will convert between upper and lower case
Xfilenames and between LF and CRLF line terminators automatically, unless told
Xto do otherwise. When binary files must be transferred, the program must be
Xinstructed not to perform LF/CRLF conversion (-i on the command line or "set
Xfile type" interactively; see below).
X
X
X1.2. Command Line Operation
X
XThe C-Kermit command line syntax has been changed from that of earlier releases
Xof Unix Kermit to conform to the "Proposed Syntax Standards for Unix System
XCommands" put forth by Kathy Hemenway and Helene Armitage of AT&T Bell
XLaboratories in Unix/World, Vol.1, No.3, 1984. The rules that apply are:
X
X - Command names must be between 2 and 9 characters ("kermit" is 6).
X - Command names must include lower case letters and digits only.
X - An option name is a single character.
X - Options are delimited by '-'.
X - Options with no arguments may be grouped (bundled) behind one
X delimiter.
X - Option-arguments cannot be optional.
X - Arguments immediately follow options, separated by whitespace.
X - The order of options does not matter.
X - '-' preceded and followed by whitespace means standard input.
X
XA group of bundled options may end with an option that has an argument.
X
XThe following notation is used in command descriptions:
X
Xfn A Unix file specification, possibly containing the "wildcard" charac-
X ters '*' or '?' ('*' matches all character strings, '?' matches any
X single character).
X
Xfn1 A Unix file specification which may not contain '*' or '?'.
X
Xrfn A remote file specification in the remote system's own syntax, which
X may denote a single file or a group of files.
X
Xrfn1 A remote file specification which should denote only a single file.
X
Xn A decimal number between 0 and 94.
X
Xc A decimal number between 0 and 127 representing the value of an ASCII
X character.
X
Xcc A decimal number between 0 and 31, or else exactly 127, representing
X the value of an ASCII control character.
X
X[ ] Any field in square braces is optional.
X
X{x,y,z} Alternatives are listed in curly braces.
X
XC-Kermit command line options may specify either actions or settings. If
XC-Kermit is invoked with a command line that specifies no actions, then it will
Xissue a prompt and begin interactive dialog. Action options specify either
Xprotocol transactions or terminal connection.
X
X-s fn Send the specified file or files. If fn contains wildcard (meta)
X characters, the Unix shell expands it into a list. If fn is '-' then
X kermit sends from standard input, which must come from a file:
X
X kermit -s - < foo.bar
X
X or a parallel process:
X
X ls -l | kermit -s -
X
X You cannot use this mechanism to send terminal typein. If you want to
X send a file whose name is "-" you can precede it with a path name, as
X in
X
X kermit -s ./-
X
X-r Receive a file or files. Wait passively for files to arrive.
X
X-k Receive (passively) a file or files, sending them to standard output.
X This option can be used in several ways:
X
X kermit -k
X Displays the incoming files on your screen; to be used only in
X "local mode" (see below).
X
X kermit -k > fn1
X Sends the incoming file or files to the named file, fn1. If more
X than one file arrives, all are concatenated together into the
X single file fn1.
X
X kermit -k | command
X Pipes the incoming data (single or multiple files) to the indicated
X command, as in
X
X kermit -k | sort > sorted.stuff
X
X-a fn1 If you have specified a file transfer option, you may specify an alter-
X nate name for a single file with the -a option. For example,
X
X kermit -s foo -a bar
X
X sends the file foo telling the receiver that its name is bar. If more
X than one file arrives or is sent, only the first file is affected by
X the -a option:
X
X kermit -ra baz
X
X stores the first incoming file under the name baz.
X
X-x Begin server operation. May be used in either local or remote mode.
X
XBefore proceeding, a few words about remote and local operation are necessary.
XC-Kermit is "local" if it is running on PC or workstation that you are using
Xdirectly, or if it is running on a multiuser system and transferring files over
Xan external communication line -- not your job's controlling terminal or con-
Xsole. C-Kermit is remote if it is running on a multiuser system and transfer-
Xring files over its own controlling terminal's communication line, connected to
Xyour PC or workstation.
X
XIf you are running C-Kermit on a PC, it is in local mode by default, with the
X"back port" designated for file transfer and terminal connection. If you are
Xrunning C-Kermit on a multiuser (timesharing) system, it is in remote mode un-
Xless you explicitly point it at an external line for file transfer or terminal
Xconnection. The following command sets C-Kermit's "mode":
X
X-l dev Line -- Specify a terminal line to use for file transfer and terminal
X connection, as in
X
X kermit -l /dev/ttyi5
X
XWhen an external line is being used, you might also need some additional op-
Xtions for successful communication with the remote system:
X
X-b n Baud -- Specify the baud rate for the line given in the -l option, as
X in
X
X kermit -l /dev/ttyi5 -b 9600
X
X This option should always be included with the -l option, since the
X speed of an external line is not necessarily what you expect.
X
X-p x Parity -- e,o,m,s,n (even, odd, mark, space, or none). If parity is
X other than none, then the 8th-bit prefixing mechanism will be used for
X transferring 8-bit binary data, provided the opposite Kermit agrees.
X The default parity is none.
X
X-t Specifies half duplex, line turnaround with XON as the handshake
X character.
X
XThe following commands may be used only with a C-Kermit which is local -- ei-
Xther by default or else because the -l option has been specified.
X
X-g rfn Actively request a remote server to send the named file or files; rfn
X is a file specification in the remote host's own syntax. If fn happens
X to contain any special shell characters, like '*', these must be
X quoted, as in
X
X kermit -g x\*.\?
X
X-f Send a 'finish' command to a remote server.
X
X-c Establish a terminal connection over the specified or default com-
X munication line, before any protocol transaction takes place. Get back
X to the local system by typing the escape character (normally
X Control-Backslash) followed by the letter 'c'.
X
X-n Like -c, but after a protocol transaction takes place; -c and -n may
X both be used in the same command. The use of -n and -c is illustrated
X below.
X
XOn a timesharing system, the -l and -b options will also have to be included
Xwith the -r, -k, or -s options if the other Kermit is on a remote system.
X
XIf C-Kermit is in local mode, the screen (stdout) is continously updated to
Xshow the progress of the file transer. A dot is printed for every four data
Xpackets, other packets are shown by type (e.g. 'S' for Send-Init), 'T' is
Xprinted when there's a timeout, and '%' for each retransmission. In addition,
Xyou may type (to stdin) certain "interrupt" commands during file transfer:
X
X Control-F: Interrupt the current File, and go on to the next (if any).
X Control-B: Interrupt the entire Batch of files, terminate the transaction.
X Control-R: Resend the current packet
X Control-A: Display a status report for the current transaction.
X
XThese interrupt characters differ from the ones used in other Kermit implemen-
Xtations to avoid conflict with Unix shell interrupt characters. With System
XIII and System V implementations of Unix, interrupt commands must be preceeded
Xby the escape character (e.g. control-\).
X
XSeveral other command-line options are provided:
X
X-i Specifies that files should be sent or received exactly "as is" with no
X conversions. This option is necessary for transmitting binary files.
X It may also be used to slightly boost efficiency in Unix-to-Unix trans-
X fers of text files by eliminating CRLF/newline conversion.
X
X-w Write-Protect -- Avoid filename collisions for incoming files.
X
X-q Quiet -- Suppress screen update during file transfer, for instance to
X allow a file transfer to proceed in the background.
X
X-d Debug -- Record debugging information in the file debug.log in the cur-
X rent directory. Use this option if you believe the program is mis-
X behaving, and show the resulting log to your local kermit maintainer.
X
X-h Help -- Display a brief synopsis of the command line options.
X
XThe command line may contain no more than one protocol action option.
X
XFiles are sent with their own names, except that lowercase letters are raised
Xto upper, pathnames are stripped off, tilde ('~') characters changed to 'X',
Xand if the file name begins with a period, an 'X' is inserted before it. In-
Xcoming files are stored under their own names except that uppercase letters are
Xlowered, and, if -w was specified, a "generation number" is appended to the
Xname if it has the same name as an existing file which would otherwise be over-
Xwritten. If the -a option is included, then the same rules apply to its ar-
Xgument. The file transfer display shows any transformations performed upon
Xfilenames.
X
XDuring transmission, files are encoded as follows:
X
X - Control characters are converted to prefixed printables.
X
X - Sequences of repeated characters are collapsed via repeat counts, if
X the other Kermit is also capable of repeated-character compression.
X
X - If parity is being used on the communication line, data characters
X with the 8th (parity) bit on are specially prefixed, provided the
X other Kermit is capable of 8th-bit prefixing (if not, 8-bit binary
X files cannot be successfully transferred).
X
X - Conversion is done between Unix newlines and carriage-return-linefeed
X sequences unless the -i option was specified.
X
X
XCommand Line Examples:
X
X kermit -l /dev/ttyi5 -b 1200 -cn -r
X
XThis command connects you to the system on the other end of ttyi5 at 1200 baud,
Xwhere you presumably log in and run Kermit with a 'send' command. After you
Xescape back, C-Kermit waits for a file (or files) to arrive. When the file
Xtransfer is completed, you are again connected to the remote system so that you
Xcan logout.
X
X kermit -l /dev/ttyi4 -b 1800 -cntp m -r -a foo
X
XThis command is like the preceding one, except the remote system in this case
Xuses half duplex communication with mark parity. The first file that arrives
Xis stored under the name foo.
X
X
X kermit -l /dev/ttyi6 -b 9600 -c | tek
X
XThis example uses Kermit to connect your terminal to the system at the other
Xend of ttyi6. The C-Kermit terminal connection does not provide any particular
Xterminal emulation, so C-Kermit's standard i/o is piped through a
X(hypothetical) program called tek, which performs (say) Tektronix emulation.
X
X
X kermit -l /dev/ttyi6 -b 9600 -nf
X
XThis command would be used to shut down a remote server and then connect to the
Xremote system, in order to log out or to make further use of it. The -n option
Xis invoked after -f (-c would have been invoked before).
X
X
X kermit -l /dev/ttyi6 -b 9600 -qg foo.\* &
X
XThis command causes C-Kermit to be invoked in the background, getting a group
Xof files from a remote server (note the quoting of the '*' character). No dis-
Xplay occurs on the screen, and the keyboard is not sampled for interruption
Xcommands. This allows other work to be done while file transfers proceed in
Xthe background.
X
X
X kermit -l /dev/ttyi6 -b 9600 -g foo.\* > foo.log < /dev/null &
X
XThis command is like the previous one, except the file transfer display has
Xbeen redirected to the file foo.log. Standard input is also redirected, to
Xprevent C-Kermit from sampling it for interruption commands.
X
X
X kermit -iwx
X
XThis command starts up C-Kermit as a server. Files are transmitted with no
Xnewline/carriage-return-linefeed conversion; the -i option is necessary for bi-
Xnary file transfer and useful for Unix-to-Unix transfers. Incoming files that
Xhave the same names as existing files are given new, unique names.
X
X
X kermit -l /dev/ttyi6 -b 9600
X
XThis command sets the communication line and speed. Since no action is
Xspecified, C-Kermit issues a prompt and enters an interactive dialog with you.
XAny settings given on the command line remain in force during the dialog, un-
Xless explicitly changed.
X
X
X kermit
X
XThis command starts up Kermit interactively with all default settings.
X
XA final example shows how Unix Kermit might be used to send an entire directory
Xtree from one Unix system to another, using the tar program as Kermit's stan-
Xdard input and output. On the orginating system, in this case the remote, type
X(for instance):
X
X
X tar cf - /usr/fdc | kermit -is -
X
XThis causes tar to send the directory /usr/fdc (and all its files and all its
Xsubdirectories and all their files...) to standard output instead of to a tape;
Xkermit receives this as standard input and sends it as a binary file. On the
Xreceiving system, in this case the local one, type (for instance):
X
X
X kermit -il /dev/ttyi5 -b 9600 -k | tar xf -
X
XKermit receives the tar archive, and sends it via standard output to its own
Xcopy of tar, which extracts from it a replica of the original directory tree.
X
X
XExit Status Codes:
X
XKermit returns an exit status of zero, except when a fatal error is encoun-
Xtered, where the exit status is set to one. With background operation (e.g.,
X'&' on invoking command line), driven by scripted interactive commands
X(redirected standard input and/or take files), any failed interactive command
X(such as failed dial or script attempt) causes the fatal error exit.
X
X
X1.3. Interactive Operation
X
XC-Kermit's interactive command prompt is "C-Kermit>". In response to this
Xprompt, you may type any valid command. C-Kermit executes the command and then
Xprompts you for another command. The process continues until you instruct the
Xprogram to terminate.
X
XCommands begin with a keyword, normally an English verb, such as "send". You
Xmay omit trailing characters from any keyword, so long as you specify suf-
Xficient characters to distinguish it from any other keyword valid in that
Xfield. Certain commonly-used keywords (such as "send", "receive", "connect")
Xhave special non-unique abbreviations ("s" for "send", "r" for "receive", "c"
Xfor "connect").
X
XCertain characters have special functions in interactive commands:
X
X ? Question mark, typed at any point in a command, will produce a message
X explaining what is possible or expected at that point. Depending on
X the context, the message may be a brief phrase, a menu of keywords, or
X a list of files.
X
X ESC (The Escape or Altmode key) -- Request completion of the current
X keyword or filename, or insertion of a default value. The result will
X be a beep if the requested operation fails.
X
X DEL (The Delete or Rubout key) -- Delete the previous character from the
X command. You may also use BS (Backspace, Control-H) for this function.
X
X ^W (Control-W) -- Erase the rightmost word from the command line.
X
X ^U (Control-U) -- Erase the entire command.
X
X ^R (Control-R) -- Redisplay the current command.
X
X SP (Space) -- Delimits fields (keywords, filenames, numbers) within a com-
X mand. HT (Horizontal Tab) may also be used for this purpose.
X
X CR (Carriage Return) -- Enters the command for execution. LF (Linefeed)
X or FF (formfeed) may also be used for this purpose.
X
X \ (Backslash) -- Enter any of the above characters into the command,
X literally. To enter a backslash, type two backslashes in a row (\\).
X
XYou may type the editing characters (DEL, ^W, etc) repeatedly, to delete all
Xthe way back to the prompt. No action will be performed until the command is
Xentered by typing carriage return, linefeed, or formfeed. If you make any mis-
Xtakes, you will receive an informative error message and a new prompt -- make
Xliberal use of '?' and ESC to feel your way through the commands. One impor-
Xtant command is "help" -- you should use it the first time you run C-Kermit.
X
XInteractive C-Kermit accepts commands from files as well as from the keyboard.
XWhen you enter interactive mode, C-Kermit looks for the file .kermrc in your
Xhome or current directory (first it looks in the home directory, then in the
Xcurrent one) and executes any commands it finds there. These commands must be
Xin interactive format, not Unix command-line format. A "take" command is also
Xprovided for use at any time during an interactive session. Command files may
Xbe nested to any reasonable depth.
X
XHere is a brief list of C-Kermit interactive commands:
X ! Execute a Unix shell command.
X bye Terminate and log out a remote Kermit server.
X close Close a log file.
X connect Establish a terminal connection to a remote system.
X cwd Change Working Directory.
X dial Dial a telephone number.
X directory Display a directory listing.
X echo Display arguments literally.
X exit Exit from the program, closing any open logs.
X finish Instruct a remote Kermit server to exit, but not log out.
X get Get files from a remote Kermit server.
X help Display a help message for a given command.
X log Open a log file -- debugging, packet, session, transaction.
X quit Same as 'exit'.
X receive Passively wait for files to arrive.
X remote Issue file management commands to a remote Kermit server.
X script Execute a login script with a remote system.
X send Send files.
X server Begin server operation.
X set Set various parameters.
X show Display values of 'set' parameters.
X space Display current disk space usage.
X statistics Display statistics about most recent transaction.
X take Execute commands from a file.
X
XThe 'set' parameters are:
X block-check Level of packet error detection.
X delay How long to wait before sending first packet.
X duplex Specify which side echoes during 'connect'.
X end-of-packet Terminator for outbound packets.
X escape-character Character to prefix "escape commands" during 'connect'.
X file Set various file parameters.
X flow-control Communication line full-duplex flow control.
X handshake Communication line half-duplex turnaround character.
X line Communication line device name.
X modem-dialer Type of modem-dialer on communication line.
X packet-length Maximum length for packets.
X pad-character Character to use for inter-packet padding.
X padding How much inter-packet padding to use.
X parity Communication line character parity.
X prompt Change the C-Kermit program's prompt.
X speed Communication line speed.
X start-of-packet Control character to mark beginning of packets.
X timeout Timer interval to detect lost packets.
X
XThe 'remote' commands are:
X cwd Change remote working directory.
X delete Delete remote files.
X directory Display a listing of remote file names.
X help Request help from a remote server.
X host Issue a command to the remote host in its own command language
X space Display current disk space usage on remote system.
X type Display a remote file on your screen.
X who Display who's logged in, or get information about a user.
X
XMost of these commands are described adequately in the Kermit User Guide. Spe-
Xcial aspects of certain Unix Kermit commands are described below.
X
X
X THE 'SEND' COMMAND
X
XSyntax: send fn - or - send fn1 rfn1
X
XSend the file or files denoted by fn to the other Kermit, which should be run-
Xning as a server, or which should be given the 'receive' command. Each file is
Xsent under its own name (as described above, or as specified by the 'set file
Xnames' command). If the second form is used, i.e. with fn1 denoting a single
XUnix file, rfn1 may be specified as a name to send it under. The 'send' com-
Xmand may be abbreviated to 's', even though 's' is not a unique abbreviation
Xfor a top-level C-Kermit command.
X
XThe wildcard (meta) characters '*' and '?' are accepted in fn. If '?' is to be
Xincluded, it must be prefixed by '\' to override its normal function of provid-
Xing help. '*' matches any string, '?' matches any single character. Other
Xnotations for file groups, like '[a-z]og', are not available in interactive
Xcommands (though of course they are available on the command line). When fn
Xcontains '*' or '?' characters, there is a limit to the number of files that
Xcan be matched, which varies from system to system. If you get the message
X"Too many files match" then you'll have to make a more judicious selection. If
Xfn was of the form
X
X usr/longname/anotherlongname/*
X
Xthen C-Kermit's string space will fill up rapidly -- try doing a cwd (see
Xbelow) to the path in question and reissuing the command.
X
XNote -- C-Kermit sends only from the current or specified directory. It does
Xnot traverse directory trees. If the source directory contains subdirectories,
Xthey will be skipped. Conversely, C-Kermit does not create directories when
Xreceiving files. If you have a need to do this, you can pipe tar through
XC-Kermit, as shown in the example on page 3, or under System III/V Unix you can
Xuse cpio.
X
XAnother Note -- C-Kermit does not skip over "invisible" files that match the
Xfile specification; Unix systems usually treat files whose names start with a
Xdot (like .login, .cshrc, and .kermrc) as invisible.
X
X
X THE 'RECEIVE' COMMAND
X
XSyntax: receive - or - receive fn1
X
XPassively wait for files to arrive from the other Kermit, which must be given
Xthe 'send' command -- the 'receive' command does not work in conjunction with a
Xserver (use 'get' for that). If fn1 is specified, store the first incoming
Xfile under that name. The 'receive' command may be abbreviated to 'r'.
X
X
X THE 'GET' COMMAND:
X
XSyntax: get rfn
X
X or: get
X rfn
X fn1
X
XRequest a remote Kermit server to send the named file or files. Since a remote
Xfile specification (or list) might contain spaces, which normally delimit
Xfields of a C-Kermit command, an alternate form of the command is provided to
Xallow the inbound file to be given a new name: type 'get' alone on a line, and
Xyou will be prompted separately for the remote and local file specifications,
Xfor example
X
X C-Kermit>get
X Remote file specification: foo
X Local name to store it under: bar
X
XAs with 'receive', if more than one file arrives as a result of the 'get' com-
Xmand, only the first will be stored under the alternate name given by fn1; the
Xremaining files will be stored under their own names if possible. If a '?' is
Xto be included in the remote file specification, you must prefix it with '\' to
Xsuppress its normal function of providing help.
X
X
X THE 'SERVER' COMMAND:
X
XThe 'server' command places C-Kermit in "server mode" on the currently selected
Xcommunication line. All further commands must arrive as valid Kermit packets
Xfrom the Kermit on the other end of the line. The Unix Kermit server can
Xrespond to the following commands:
X
XCommand Server Response
X get Sends files
X send Receives files
X bye Attempts to log itself out
X finish Exits to level from which it was invoked
X remote directory Sends directory lising
X remote delete Removes files
X remote cwd Changes working directory
X remote type Sends files to your screen
X remote space Reports about its disk usage
X remote who Shows who's logged in
X remote host Executes a Unix shell command
X remote help Lists these capabilities
X
XNote that the Unix Kermit server cannot always respond to a BYE command. It
Xwill attempt to do so using "kill(0,9)", but this will not work on all systems
Xor under all conditions. For instance, the C-Shell changes your process group,
Xso that the process id of 0 does not refer to what you might expect.
X
XIf the Kermit server is directed at an external line (i.e. it is in "local
Xmode") then the console may be used for other work if you have 'set file dis-
Xplay off'; normally the program expects the console to be used to observe file
Xtransfers and enter status queries or interruption commands. The way to get
XC-Kermit into background operation from interactive command level varies from
Xsystem to system (e.g. on Berkeley Unix you would halt the program with ^Z and
Xthen use the C-Shell 'bg' command to continue it in the background). The more
Xcommon method is to invoke the program with the desired command line arguments,
Xincluding "-q", and with a terminating "&".
X
XWhen the Unix Kermit server is given a 'remote host' command, it executes it
Xusing the shell invoked upon login to the remote system, e.g. the Bourne shell
Xor the Berkeley C-Shell. (Note -- this is in distinction to the local "!"
Xshell escape, which always uses the Bourne shell; see below).
X
X
X THE 'REMOTE', 'BYE', AND 'FINISH' COMMANDS:
X
XC-Kermit may itself request services from a remote Kermit server. In addition
Xto the 'send' and 'get' commands, the following may also be used:
X
X remote cwd [directory]
X If the optional remote directory specification is included, you will be
X prompted on a separate line for a password, which will not echo as you
X type it.
X
X remote delete rfn delete remote file or files.
X remote directory [rfn] directory listing of remote files.
X remote host command command in remote host's own command language.
X remote space disk usage report from remote host.
X remote type [rfn] display remote file or files on the screen.
X remote who [user] display information about who's logged in.
X remote help display remote server's capabilities.
X
X bye and finish:
X When connected to a remote Kermit server, these commands cause the
X remote server to terminate; 'finish' returns it to Kermit or system
X command level (depending on the implementation or how the program was
X invoked); 'bye' also requests it to log itself out.
X
X
X THE 'LOG' AND 'CLOSE' COMMANDS:
X
XSyntax: log {debugging, packets, session, transactions} [ fn1 ]
X
XC-Kermit's progress may be logged in various ways. The 'log' command opens a
Xlog, the 'close' command closes it. In addition, all open logs are closed by
Xthe 'exit' and 'quit' commands. A name may be specified for a log file; if the
Xname is omitted, the file is created with a default name as shown below.
X
Xlog debugging
X This produces a voluminous log of the internal workings of C-Kermit, of use
X to Kermit developers or maintainers in tracking down suspected bugs in the
X C-Kermit program. Use of this feature dramatically slows down the Kermit
X protocol. Default name: debug.log.
X
Xlog packets
X This produces a record of all the packets that go in and out of the com-
X munication port. This log is of use to Kermit maintainers who are tracking
X down protocol problems in either C-Kermit or any Kermit that C-Kermit is
X connected to. Default name: packet.log.
X
Xlog session
X This log will contain a copy of everything you see on your screen during
X the 'connect' command, except for local messages or interaction with local
X escape commands. Default name: session.log.
X
Xlog transactions
X The transaction log is a record of all the files that were sent or received
X while transaction logging was in effect. It includes time stamps and
X statistics, filename transformations, and records of any errors that may
X have occurred. The transaction log allows you to have long unattended file
X transfer sessions without fear of missing some vital screen message.
X Default name: transaction.log.
X
XThe 'close' command explicitly closes a log, e.g. 'close debug'.
X
X
X LOCAL FILE MANAGEMENT COMMANDS:
X
XUnix Kermit allows some degree of local file management from interactive com-
Xmand level:
X
Xdirectory [fn]
X Displays a listing of the names, modes, sizes, and dates of files matching
X fn (which defaults to '*'). Equivalent to 'ls -l'.
X
Xcwd [directory-name]
X Changes Kermit's working directory to the one given, or to the your default
X directory if the directory name is omitted. Equivalent to 'cd'.
X
Xspace
X Display information about disk space and/or quota in the current directory
X and device.
X
X! command
X The command is executed by the Unix shell. Use this for all other file
X management commands. This command has certain peculiarities:
X
X - The Bourne shell is used.
X - At least one space must separate the '!' from the shell command.
X - A 'cd' command executed in this manner will have no effect -- use
X the C-Kermit 'cwd' command instead.
X
X
X THE 'SET' AND 'SHOW' COMMANDS:
X
XSince Kermit is designed to allow diverse systems to communicate, it is often
Xnecessary to issue special instructions to allow the program to adapt to
Xpeculiarities of the another system or the communication path. These instruc-
Xtions are accomplished by the 'set' command. The 'show' command may be used to
Xdisplay current settings. Here is a brief synopsis of settings available in
Xthe current release of C-Kermit:
X
Xblock-check {1, 2, 3}
X Determines the level of per-packet error detection. "1" is a single-
X character 6-bit checksum, folded to include the values of all bits from
X each character. "2" is a 2-character, 12-bit checksum. "3" is a
X 3-character, 16-bit cyclic redundancy check (CRC). The higher the block
X check, the better the error detection and correction and the higher the
X resulting overhead. Type 1 is most commonly used; it is supported by all
X Kermit implementations, and it has proven adequate in most circumstances.
X Types 2 or 3 would be used to advantage when transferring 8-bit binary
X files over noisy lines.
X
Xdelay n
X How many seconds to wait before sending the first packet after a 'send'
X command. Used in remote mode to give you time to escape back to your local
X Kermit and issue a 'receive' command. Normally 5 seconds.
X
Xduplex {full, half}
X For use during 'connect'. Specifies which side is doing the echoing;
X 'full' means the other side, 'half' means C-Kermit must echo typein itself.
X
Xend-of-packet cc
X Specifies the control character needed by the other Kermit to recognize the
X end of a packet. C-Kermit sends this character at the end of each packet.
X Normally 13 (carriage return), which most Kermit implementations require.
X Other Kermits require no terminator at all, still others may require a dif-
X ferent terminator, like linefeed (10).
X
!FUNKY!STUFF!
More information about the Comp.sources.unix
mailing list