Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7 $; site okstate Path: utzoo!linus!philabs!cmcl2!seismo!hao!hplabs!sdcrdcf!sdcsvax!akgua!whuxlm!whuxl!houxm!ihnp4!okstate!authorplaceholder From: gregg@okstate.UUCP Newsgroups: net.sources Subject: C-KERMIT (part 1 of 10) Message-ID: <5200014@okstate> Date: Fri, 8-Mar-85 02:40:00 EST Article-I.D.: okstate.5200014 Posted: Fri Mar 8 02:40:00 1985 Date-Received: Tue, 12-Mar-85 21:08:38 EST Lines: 805 Nf-ID: #N:okstate:5200014:000:36984 Nf-From: okstate!gregg Mar 8 01:40:00 1985 echo x - ckermi.mss part1 sed '1,$s/^X//' <<\!FUNKY!STUFF! > ckermi.mss X@comment[ -*-Text-*- ] X@Part(CKUNIX,root="KER:KUSER") X@string(-ckversion="@q<4.2>") X@define(exx=example,above 2,below 1) X@Chapter X X@Begin X@i(Program:)@\Frank da Cruz, Bill Catchings, Jeff Damens, Columbia XUniversity; Herm Fischer, Litton Data Systems, Van Nuys CA; contributions by Xmany others. X X@i(Language:)@\C X X@i(Documentation:)@\Frank da Cruz, Columbia University; Herm XFischer, Litton Data Systems, Van Nuys CA. X X@i(Version:)@\@value(-ckversion) X X@i(Date: )@\March 1985 X@end X@Center(D R A F T) X X@begin(quotation) XNOTE -- This source for this Xdocumentation is written as input for the Scribe text formatter. XIt needs to become input for two text formatters - Scribe and Nroff, the Xformer for inclusion in the Kermit User Guide, and the latter for XUnix man pages. This might be done by defining formatting macros Xin M4, which generate the appropriate Scribe and Nroff commands for Xsectioning, itemization, description, etc. (Volunteers?) X@end(quotation) X XC-Kermit is a completely new implementation of Kermit, written modularly and Xtransportably in C. The protocol state transition table is written in X@i'wart', a (not proprietary) lex-like preprocessor for C. System-dependent Xprimitive functions are isolated into separately compiled modules so that the Xprogram should be easily portable among Unix systems and also to non-Unix Xsystems that have C compilers. X X@subheading X@begin X@tabclear()@tabset(3.5inches,4.0inches) XLocal operation:@\Yes XLocal operation:@\Yes XRemote operation:@\Yes XLogin scripts:@\Yes XTransfer text files:@\Yes XTransfer binary files:@\Yes XWildcard send:@\Yes XFile transfer interruption:@\Yes XFilename collision avoidance:@\Yes XCan time out:@\Yes X8th-bit prefixing:@\Yes XRepeat count prefixing:@\Yes XAlternate block checks:@\Yes XTerminal emulation:@\Yes XCommunication settings:@\Yes XTransmit BREAK:@\Yes XSupport for dialout modems:@\Yes XIBM mainframe communication:@\Yes XTransaction logging:@\Yes XSession logging:@\Yes XDebug logging:@\Yes XPacket logging:@\Yes XAct as server:@\Yes XTalk to server:@\Yes XAdvanced server functions:@\Yes XLocal file management:@\Yes XCommand/Init files:@\Yes XUUCP and multiuser line locking:@\Yes XFile attributes:@\No XCommand macros:@\No XRaw file transmit:@\No X@end X X@index(C-Kermit)@index(Unix Kermit) XC-Kermit provides traditional Unix command line operation as well as Xinteractive command prompting and execution. The command line options Xprovide access to a minimal subset of C-Kermit's capabilities; the Xinteractive command set 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@section(The Unix File System) X XConsult your Unix manual for details about the file system under your Xversion of Unix. For the purposes of Kermit, several things are worth Xbriefly noting. Unix files generally have lowercase names. Unix Xdirectories are tree-@|structured. Directory levels are separated by X"@q(/)" characters. For example, X@example(/usr/foo/bar) Xdenotes the file @q(bar) in the directory @q(/usr/foo). Wildcard or X"meta" characters allow groups of files to be specified. "@q(*)" Xmatches any string; "@q(?)" matches any single character. X XWhen C-Kermit is invoked with files specified on the Unix command line, Xthe Unix shell (Bourne Shell, C-Shell, etc) expands meta characters, and Xin this case, a wider variety is available. For example, X@example(kermit -s ~/ck[x-z]*.[ch]) Xis expanded by the Berkeley C-Shell into a list of all the files in the Xuser's home directory (@q[~/]) that start with the characters "@q(ck)", Xfollowed by a single character @q(x), @q(y), or @q(z), followed by zero Xor more characters, followed by a dot, followed by one of the characters X@q(c) or @q(h). Internally, the C-Kermit program itself expands only Xthe @q("*") and @q("?") meta characters. X XUnix files are linear streams of 8-bit bytes. Text files consist of X7-bit ASCII characters, with the high bit off (0), and lines separated by Xthe Unix newline character, which is linefeed (LF, ASCII 10). This Xdistinguishes Unix text files from those on most other ASCII systems, in Xwhich lines are separated by a carriage-@|return linefeed sequence X(CRLF, ASCII 13 followed by ASCII 10). Binary files are likely to contain Xdata in the high bits of the file bytes, and are not treated in terms of Xlines. X XWhen transferring files, C-Kermit will convert between upper and lower Xcase filenames and between LF and CRLF line terminators automatically, Xunless told to do otherwise. When binary files must be transferred, the Xprogram must be instructed not to perform LF/CRLF conversion (@q[-i] on the Xcommand line or "set file type" interactively; see below). X X@section(Command Line Operation) X XThe C-Kermit command line syntax has been changed from that of earlier Xreleases of Unix Kermit to conform to the "Proposed Syntax Standards for XUnix System Commands" put forth by Kathy Hemenway and Helene Armitage of XAT&T Bell Laboratories in @ux(Unix/World), Vol.1, No.3, 1984. The rules that Xapply are: X X@begin(itemize,spread 0) XCommand names must be between 2 and 9 characters ("kermit" is 6). X XCommand names must include lower case letters and digits only. X XAn option name is a single character. X XOptions are delimited by '@q(-)'. X XOptions with no arguments may be grouped (bundled) behind one delimiter. X XOption-arguments cannot be optional. X XArguments immediately follow options, separated by whitespace. X XThe order of options does not matter. X X'@q(-)' preceded and followed by whitespace means standard input. X@end(itemize) XA group of bundled options may end with an option that has an argument. X XThe following notation is used in command descriptions: X@begin(description,leftmargin +8,indent -8) X@i(fn)@\A Unix file specification, possibly containing the "wildcard" Xcharacters '@q[*]' or '@q[?]' ('@q[*]' matches all character strings, '@q[?]' Xmatches any single character). X X@i(fn1)@\A Unix file specification which may not contain '@q[*]' or '@q[?]'. X X@i(rfn)@\A remote file specification in the remote system's own syntax, which Xmay denote a single file or a group of files. X X@i(rfn1)@\A remote file specification which should denote only a single file. X X@i(n)@\A decimal number between 0 and 94. X X@i(c)@\A decimal number between 0 and 127 representing the value of an XASCII character. X X@i(cc)@\A decimal number between 0 and 31, or else exactly 127, Xrepresenting the value of an ASCII control character. X X@q([ ])@\Any field in square braces is optional. X X@q({x,y,z})@\Alternatives are listed in curly braces. X@end(description) 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 Xwill issue a prompt and begin interactive dialog. XAction options specify either protocol transactions or terminal connection. X X@begin X@q(-s )@i(fn)@\Send the specified file or files. If @i(fn) contains Xwildcard (meta) characters, the Unix shell expands it into a list. If @i(fn) Xis '@q[-]' then kermit sends from standard input, which must Xcome from a file: X@example(kermit -s - < foo.bar) Xor a parallel process: X@example(ls -l | kermit -s -) XYou cannot use this mechanism to send Xterminal typein. If you want to send a file whose name is "-" Xyou can precede it with a path name, as in X@example(kermit -s ./-) X X@q(-r)@\Receive a file or files. Wait passively for files to arrive. X X@q(-k)@\Receive (passively) a file or files, sending them to standard Xoutput. This option can be used in several ways: X@begin(description,leftmargin +4,indent -4) X@q(kermit -k)@\Displays the incoming files on your screen; to be used only Xin "local mode" (see below). X X@q(kermit -k > )@i(fn1)@\Sends the incoming file or files to the named file, X@i(fn1). If more than one file arrives, all are concatenated together Xinto the single file @i(fn1). X X@q(kermit -k | command)@\Pipes the incoming data (single or multiple Xfiles) to the indicated command, as in X@example'kermit -k | sort > sorted.stuff' X@end(description) X X@q(-a )@i(fn1)@\If you have specified a file transfer option, you may specify Xan alternate name for a single file with the @q(-a) option. For example, X@example'kermit -s foo -a bar' Xsends the file @q(foo) telling the receiver that its name is @q(bar). XIf more than one file arrives or is sent, only the first file is Xaffected by the @q(-a) option: X@example'kermit -ra baz' Xstores the first incoming file under the name @q(baz). X X@q(-x)@\Begin server operation. May be used in either local or remote mode. X@end(description) X XBefore proceeding, a few words about remote and local operation are Xnecessary. C-Kermit is "local" if it is running on PC or workstation that Xyou are using directly, or if it is running on a multiuser system and Xtransferring files over an external communication line -- not your job's Xcontrolling terminal or console. C-Kermit is remote if it is running on a Xmultiuser system and transferring files over its own controlling terminal's Xcommunication line, connected to your PC or workstation. X XIf you are running C-Kermit on a PC, it is in local mode by default, Xwith the "back port" designated for file transfer and terminal connection. XIf you are running C-Kermit on a multiuser (timesharing) system, it is Xin remote mode unless you explicitly point it at an external line for Xfile transfer or terminal connection. The following command sets XC-Kermit's "mode": X X@begin(description,leftmargin +8,indent -8) X@q(-l )@i(dev)@\Line -- Specify a terminal line to use for file Xtransfer and terminal connection, as in X@example'kermit -l /dev/ttyi5' X@end(description) X XWhen an external line is being used, you might also need some additional Xoptions for successful communication with the remote system: X X@begin(description,leftmargin +8,indent -8) X@q(-b )@i(n)@\Baud -- Specify the baud rate for the line given in the X@q(-l) option, as in X@example'kermit -l /dev/ttyi5 -b 9600' XThis option should always be included with the @q(-l) option, since the Xspeed of an external line is not necessarily what you expect. X X@q(-p )@i(x)@\Parity -- e,o,m,s,n (even, odd, mark, space, or none). If parity Xis other than none, then the 8th-bit prefixing mechanism will be Xused for transferring 8-bit binary data, provided the opposite XKermit agrees. The default parity is none. X X@q(-t)@\Specifies half duplex, line turnaround with XON as the handshake Xcharacter. X@end(description) X XThe following commands may be used only with a C-Kermit which is local -- Xeither by default or else because the -l option has been specified. X X@begin(description,leftmargin +8,indent -8) X@q(-g )@i(rfn)@\Actively request a remote server to send the named file Xor files; @i(rfn) is a file specification in the remote host's own syntax. If X@i(fn) happens to contain any special shell characters, like '@q(*)', Xthese must be quoted, as in X@example'kermit -g x\*.\?' X X@q(-f)@\Send a 'finish' command to a remote server. X X@q(-c)@\Establish a terminal connection over the specified or default Xcommunication line, before any protocol transaction takes place. XGet back to the local system by typing the escape character X(normally Control-Backslash) followed by the letter 'c'. X X@q(-n)@\Like @q(-c), but after a protocol transaction takes place; X@q(-c) and @q(-n) may both be used in the same command. The use of @q(-n) Xand @q(-c) is illustrated below. X@end(description) XOn a timesharing system, the @q(-l) and @q(-b) options will also have to Xbe included with the @q(-r), @q(-k), or @q(-s) options if the other XKermit 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. '@q(S)' for Send-Init), X'@q(T)' is printed when there's a timeout, and '@q(%)' for each Xretransmission. In addition, you may type (to stdin) certain "interrupt" Xcommands during file transfer: X@begin(description,leftmargin +16,indent -12,spread 0) XControl-F:@\Interrupt the current File, and go on to the next (if any). X XControl-B:@\Interrupt the entire Batch of files, terminate the transaction. X XControl-R:@\Resend the current packet X XControl-A:@\Display a status report for the current transaction. X@end(description) XThese interrupt characters differ from the ones used in other Kermit Ximplementations to avoid conflict with Unix shell interrupt characters. XWith System III and System V implementations of Unix, interrupt commands Xmust be preceeded by the escape character (e.g. control-@q[\]). X XSeveral other command-line options are provided: X X@begin(description,leftmargin +8,indent -8) X@q(-i)@\Specifies that files should be sent or received exactly "as is" Xwith no conversions. This option is necessary for transmitting Xbinary files. It may also be used to slightly boost efficiency Xin Unix-to-Unix transfers of text files by eliminating CRLF/newline Xconversion. X X@q(-w)@\Write-Protect -- Avoid filename collisions for incoming files. X X@q(-q)@\Quiet -- Suppress screen update during file transfer, for instance Xto allow a file transfer to proceed in the background. X X@q(-d)@\Debug -- Record debugging information in the file @q(debug.log) in Xthe current directory. Use this option if you believe the program Xis misbehaving, and show the resulting log to your local Xkermit maintainer. X X@q(-h)@\Help -- Display a brief synopsis of the command line options. X@end(description) 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 Xraised to upper, pathnames are stripped off, tilde ('@q[~]') characters Xchanged to '@q(X)', and if the file name begins with a period, an X'@q(X)' is inserted before it. Incoming files are stored under their Xown names except that uppercase letters are lowered, and, if @q(-w) was Xspecified, a "generation number" is appended to the name if it has the Xsame name as an existing file which would otherwise be overwritten. If Xthe @q(-a) option is included, then the same rules apply to its Xargument. The file transfer display shows any transformations performed Xupon filenames. X XDuring transmission, files are encoded as follows: X@begin(itemize) XControl characters are converted to prefixed printables. X XSequences of repeated characters are collapsed via repeat counts, if Xthe other Kermit is also capable of repeated-character compression. X XIf parity is being used on the communication line, data characters with Xthe 8th (parity) bit on are specially prefixed, provided the other Kermit Xis capable of 8th-bit prefixing (if not, 8-bit binary files cannot be Xsuccessfully transferred). X XConversion is done between Unix newlines and carriage-return-linefeed Xsequences unless the @q(-i) option was specified. X@end(itemize) X X@subheading(Command Line Examples:) X X@example(kermit -l /dev/ttyi5 -b 1200 -cn -r) XThis command connects you to the system on the other end of ttyi5 at X1200 baud, where you presumably log in and run Kermit with a 'send' Xcommand. After you escape back, C-Kermit waits for a file (or files) to Xarrive. When the file transfer is completed, you are again connected to Xthe remote system so that you can logout. X X@example(kermit -l /dev/ttyi4 -b 1800 -cntp m -r -a foo) XThis command is like the preceding one, except the remote system in this Xcase uses half duplex communication with mark parity. The first file Xthat arrives is stored under the name @q(foo). X X@exx(kermit -l /dev/ttyi6 -b 9600 -c | tek) XThis example uses Kermit to connect your terminal to the system at the Xother end of ttyi6. The C-Kermit terminal connection does not Xprovide any particular terminal emulation, so C-Kermit's standard i/o is Xpiped through a (hypothetical) program called tek, which performs (say) XTektronix emulation. X X@exx(kermit -l /dev/ttyi6 -b 9600 -nf) XThis command would be used to shut down a remote server and then connect Xto the remote system, in order to log out or to make further use of it. XThe @q(-n) option is invoked @i(after) @q(-f) (@q[-c] would have been invoked Xbefore). X X@exx(kermit -l /dev/ttyi6 -b 9600 -qg foo.\* &) 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 '@q[*]' character). No Xdisplay occurs on the screen, and the keyboard is not sampled for Xinterruption commands. This allows other work to be done while file Xtransfers proceed in the background. X X@exx(kermit -l /dev/ttyi6 -b 9600 -g foo.\* > foo.log < /dev/null &) XThis command is like the previous one, except the file transfer display has Xbeen redirected to the file @q(foo.log). Standard input is also redirected, to Xprevent C-Kermit from sampling it for interruption commands. X X@exx(kermit -iwx) XThis command starts up C-Kermit as a server. Files are transmitted with Xno newline/@|carriage-@|return-@|linefeed conversion; the @q(-i) option is Xnecessary for binary file transfer and useful for Unix-@|to-@|Unix transfers. XIncoming files that have the same names as existing files are given new, unique Xnames. X X@exx(kermit -l /dev/ttyi6 -b 9600) XThis command sets the communication line and speed. Since no action is Xspecified, C-Kermit issues a prompt and enters an interactive dialog with Xyou. Any settings given on the command line remain in force during the Xdialog, unless explicitly changed. X X@exx(kermit) 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 Xstandard input and output. On the orginating system, in this case the remote, Xtype (for instance):@label(-uxtar) X X@exx(tar cf - /usr/fdc | kermit -is -) XThis causes tar to send the directory @q(/usr/fdc) (and all its files and all Xits subdirectories and all their files...) to standard output instead of to a Xtape; kermit receives this as standard input and sends it as a binary file. XOn the receiving system, in this case the local one, type (for instance): X X@exx(kermit -il /dev/ttyi5 -b 9600 -k | tar xf -) 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@subheading(Exit Status Codes:) X XKermit returns an exit status of zero, except when a fatal error is Xencountered, where the exit status is set to one. With background Xoperation (e.g., '@q(&)' on invoking command line), driven by scripted Xinteractive commands (redirected standard input and/or take files), Xany failed interactive command (such as failed dial or script attempt) Xcauses the fatal error exit. X X X@section(Interactive Operation) X XC-Kermit's interactive command prompt is "@q(C-Kermit>)". In response to this Xprompt, you may type any valid command. C-Kermit executes the command and Xthen prompts you for another command. The process continues until you Xinstruct the program to terminate. X XCommands begin with a keyword, normally an English verb, such as "send". XYou may omit trailing characters from any keyword, so long as you specify Xsufficient 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", X"c" for "connect"). X XCertain characters have special functions in interactive commands: X@Begin(Description,leftmargin +8,indent -4) X@q(?)@\Question mark, typed at any point in a command, will produce a Xmessage explaining what is possible or expected at that point. Depending on Xthe context, the message may be a brief phrase, a menu of keywords, or a list Xof files. X X@q(ESC)@\(The Escape or Altmode key) -- Request completion of the current Xkeyword or filename, or insertion of a default value. The result will be a Xbeep if the requested operation fails. X X@q(DEL)@\(The Delete or Rubout key) -- Delete the previous character from the Xcommand. You may also use BS (Backspace, Control-H) for this function. X X@q(^W)@\(Control-W) -- Erase the rightmost word from the command line. X X@q(^U)@\(Control-U) -- Erase the entire command. X X@q(^R)@\(Control-R) -- Redisplay the current command. X X@q(SP)@\(Space) -- Delimits fields (keywords, filenames, numbers) within Xa command. HT (Horizontal Tab) may also be used for this purpose. X X@q(CR)@\(Carriage Return) -- Enters the command for execution. LF (Linefeed) Xor FF (formfeed) may also be used for this purpose. X X@q(\)@\(Backslash) -- Enter any of the above characters into the command, Xliterally. To enter a backslash, type two backslashes in a row (@q[\\]). X@End(Description) XYou may type the editing characters (@q[DEL], @q[^W], etc) repeatedly, to Xdelete all the way back to the prompt. No action will be performed until the Xcommand is entered by typing carriage return, linefeed, or formfeed. If you Xmake any mistakes, you will receive an informative error message and a new Xprompt -- make liberal use of '@q[?]' and ESC to feel your way through the Xcommands. One important command is "help" -- you should use it the first time Xyou run C-Kermit. X XInteractive C-Kermit accepts commands from files as well as from the Xkeyboard. When you enter interactive mode, C-Kermit looks for the file X@q(.kermrc) in your home or current directory (first it looks in the home Xdirectory, then in the current one) and executes any commands it finds there. XThese commands must be in interactive format, not Unix command-line format. XA "take" command is also provided for use at any time during an interactive Xsession. Command files may be nested to any reasonable depth. X XHere is a brief list of C-Kermit interactive commands: X@begin(format,spread 0) X@tabclear()@tabset(1.5inches,2.0inches,2.5inches) 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@end(format) X XThe 'set' parameters are: X@begin(format,spread 0) X@tabclear()@tabset(1.5inches,2.0inches,2.5inches) 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@end(format) X XThe 'remote' commands are: X@begin(format,spread 0) X@tabclear()@tabset(1.5inches,2.0inches,2.5inches) 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@end(format) X XMost of these commands are described adequately in the Kermit User Guide. XSpecial aspects of certain Unix Kermit commands are described below. X X@heading X XSyntax: @q@i(fn)@q<@ @ - >@i@q< -@ @ >@q@i(fn1)@q< >@i X XSend the file or files denoted by fn to the other Kermit, which should be Xrunning as a server, or which should be given the 'receive' command. Each Xfile is sent under its own name (as described above, or as Xspecified by the 'set file names' command). If the second form is used, Xi.e. with @i(fn1) denoting a single Unix file, @i(rfn1) may be specified as a Xname to send it under. The 'send' command may be abbreviated to 's', even Xthough 's' is not a unique abbreviation for a top-level C-Kermit command. X XThe wildcard (meta) characters '@q[*]' and '@q[?]' are accepted in @i(fn). If X'@q[?]' is to be included, it must be prefixed by '@q[\]' to override its Xnormal function of providing help. '@q[*]' matches any string, '@q[?]' matches Xany single character. Other notations for file groups, like '@q([a-z]og)', are Xnot available in interactive commands (though of course they are available on Xthe command line). When @i(fn) contains '@q[*]' or '@q[?]' characters, there Xis a limit to the number of files that can be matched, which varies from system Xto system. If you get the message "Too many files match" then you'll have to Xmake a more judicious selection. If @i(fn) was of the form X@example(usr/longname/anotherlongname/*) 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 X@i -- C-Kermit sends only from the current or specified directory. XIt does not traverse directory trees. If the source directory contains Xsubdirectories, they will be skipped. Conversely, C-Kermit does not create Xdirectories when receiving files. If you have a need to do this, you can Xpipe tar through C-Kermit, as shown in the example on page @pageref(-uxtar), Xor under System III/V Unix you can use cpio. X X@i -- C-Kermit does not skip over "invisible" files that match Xthe file specification; Unix systems usually treat files whose names start Xwith a dot (like @q(.login), @q(.cshrc), and @q(.kermrc)) as invisible. X X@heading X XSyntax: @q@i@q< -@ @ receive >@i 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 @i(fn1) is specified, store the first incoming Xfile under that name. The 'receive' command may be abbreviated to 'r'. X X X@heading X XSyntax:@q< get >@i X@begin(example) X @i: get X @i(rfn) X @i(fn1) X@end(example) XRequest a remote Kermit server to send the named file or files. Since a Xremote file specification (or list) might contain spaces, which normally Xdelimit fields of a C-Kermit command, an alternate form of the command is Xprovided to allow the inbound file to be given a new name: type 'get' alone Xon a line, and you will be prompted separately for the remote and local Xfile specifications, for example X@Begin(Example) XC-Kermit>@ux(get) X Remote file specification: @ux(foo) X Local name to store it under: @ux(bar) X@End(Example) XAs with 'receive', if more than one file arrives as a result of the 'get' Xcommand, only the first will be stored under the alternate name given by X@i(fn1); the remaining files will be stored under their own names if possible. XIf a '@q[?]' is to be included in the remote file specification, you must Xprefix it with '@q[\]' to suppress its normal function of providing help. X X@heading(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@begin(format,spread 0,above 1,below 1) X@tabclear()@tabset(2.25inches) X@u@\@ux 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@end(format) XNote that the Unix Kermit server cannot always respond to a BYE command. XIt will attempt to do so using "@q", but this will not work Xon all systems or under all conditions. For instance, the C-Shell Xchanges your process group, so that the process id of 0 does not refer Xto what you might expect. X XIf the Kermit server is directed at an external line (i.e. it is in X"local mode") then the console may be used for other work if you have X'set file display off'; normally the program expects the Xconsole to be used to observe file transfers and enter status queries or Xinterruption commands. The way to get C-Kermit into background operation from Xinteractive command level varies from system to system (e.g. on Berkeley Unix Xyou would halt the program with @q(^Z) and then use the C-Shell 'bg' command to Xcontinue it in the background). The more common method Xis to invoke the program with the desired command line arguments, including X"@q(-q)", and with a terminating "@q(&)". 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 "@q" Xshell escape, which always uses the Bourne shell; see below). X X@Heading(The 'remote', 'bye', and 'finish' commands:) X XC-Kermit may itself request services from a remote Kermit server. In Xaddition to the 'send' and 'get' commands, the following may also be used: X X@begin(description,leftmargin +8,indent -4) Xremote cwd [@i(directory)]@\If the optional remote directory specification is Xincluded, you will be prompted on a separate line for a password, which will Xnot echo as you type it. X@end(description) X@begin(description,leftmargin +28, indent -24,spread 0,above 1) Xremote delete rfn@\delete remote file or files. X Xremote directory [@i(rfn)]@\directory listing of remote files. X Xremote host @i(command)@\command in remote host's own command language. X Xremote space@\disk usage report from remote host. X Xremote type [@i(rfn)]@\display remote file or files on the screen. X Xremote who [@i(user)]@\display information about who's logged in. X Xremote help@\display remote server's capabilities. X@end(description) X@begin(description,leftmargin +8,indent -4) Xbye @i(and) finish:@\When connected to a remote Kermit server, these commands Xcause the remote server to terminate; 'finish' returns it to Kermit or system Xcommand level (depending on the implementation or how the program was invoked); X'bye' also requests it to log itself out. X@end(description) X@heading(The 'log' and 'close' commands:) X XSyntax: @q[ @i(fn1) ] X XC-Kermit's progress may be logged in various ways. The 'log' command Xopens a log, the 'close' command closes it. In addition, all open logs Xare closed by the 'exit' and 'quit' commands. A name may be specified for Xa log file; if the name is omitted, the file is created with a default Xname as shown below. X X@begin(description,leftmargin +4,indent -4) Xlog debugging@\This produces a voluminous log of the internal workings of XC-Kermit, of use to Kermit developers or maintainers in tracking down suspected Xbugs in the C-Kermit program. Use of this feature dramatically slows down the XKermit protocol. Default name: @q(debug.log). X Xlog packets@\This produces a record of all the packets that go in and out of Xthe communication port. This log is of use to Kermit maintainers who are Xtracking down protocol problems in either C-Kermit or any Kermit that XC-Kermit is connected to. Default name: @q(packet.log). X Xlog session@\This log will contain a copy of everything you see on your screen Xduring the 'connect' command, except for local messages or interaction with Xlocal escape commands. Default name: @q(session.log). X Xlog transactions@\The transaction log is a record of all the files that were Xsent or received while transaction logging was in effect. It includes time Xstamps and statistics, filename transformations, and records of any Xerrors that may have occurred. The transaction log allows you to have Xlong unattended file transfer sessions without fear of missing some Xvital screen message. Default name: @q(transaction.log). X@end(description) XThe 'close' command explicitly closes a log, e.g. 'close debug'. X X@Heading(Local File Management Commands:) X XUnix Kermit allows some degree of local file management from interactive Xcommand level: X@begin(description,leftmargin +4,indent -4) Xdirectory [@i(fn)]@\ XDisplays a listing of the names, modes, sizes, and dates of files Xmatching @i(fn) (which defaults to '@q[*]'). Equivalent to '@q(ls -l)'. X Xcwd [directory-name]@\ XChanges Kermit's working directory to the one given, or to the your Xdefault directory if the directory name is omitted. Equivalent to 'cd'. X Xspace@\ XDisplay information about disk space and/or quota in the current Xdirectory and device. X X@q(! )@i(command)@\ XThe command is executed by the Unix shell. Use this for all other Xfile management commands. This command has certain peculiarities: X@begin(itemize,spread 0) XThe Bourne shell is used. X XAt least one space must separate the '!' from the shell command. X XA 'cd' command executed in this manner will have no effect -- use the XC-Kermit 'cwd' command instead. X@end(itemize) X@end(description) X X@heading(The 'set' and 'show' Commands:) X XSince Kermit is designed to allow diverse systems to communicate, it is Xoften necessary to issue special instructions to allow the program to adapt Xto peculiarities of the another system or the communication path. These Xinstructions are accomplished by the 'set' command. The 'show' command may Xbe used to display current settings. Here is a brief synopsis of settings Xavailable in the current release of C-Kermit: X X@begin(description,leftmargin +4,indent -4) Xblock-check {1, 2, 3}@\ Determines the level of per-packet error detection. X"1" is a single-@|character 6-bit checksum, folded to include the values of all Xbits from each character. "2" is a 2-character, 12-bit checksum. "3" is a X3-character, 16-bit cyclic redundancy check (CRC). The higher the block check, Xthe better the error detection and correction and the higher the resulting Xoverhead. Type 1 is most commonly used; it is supported by all Kermit Ximplementations, and it has proven adequate in most circumstances. Types 2 or X3 would be used to advantage when transferring 8-bit binary files over noisy Xlines. X Xdelay @i(n)@\How many seconds to wait before sending the first packet after a X'send' command. Used in remote mode to give you time to escape back to your !FUNKY!STUFF!