source: trunk/third/kermit/ @ 10780

Revision 10780, 37.4 KB checked in by brlewis, 27 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r10779, which included commits to RCS files with non-trunk default branches.
1.\" @(#) kermit.1 6.0.192 96/09/06 Columbia University
2.TH KERMIT 1C "6 Sep 96" "UNIX C-Kermit"
4kermit \- C-Kermit 6.0.192 communications software for serial and network
5connections: modem dialing, file transfer and management, terminal connection,
6character-set translation, and script programming.
8.B kermit
9[ command-file ] [ options ... ]
11.I Kermit
12is a family of file transfer, management, and communication software programs
13from Columbia University available for most computers and operating systems.
14The UNIX version of Kermit, called
15.IR "C-Kermit",
16supports serial connections (direct or dialed) and, in most UNIX
17implementations, also TCP/IP connections.  On SunOS systems equipped with
18SunLink X.25, C-Kermit can also make X.25 connections.
19C-Kermit can be thought of as a user-friendly and powerful alternative to cu,
20tip, uucp, ftp, and telnet; a single package for both network and serial
21communications, offering automation, convenience, and language features not
22found in the other packages, and having a great deal in common with its
23cousins, C-Kermit on other UNIX platforms, Kermit 95 for Windows 95 and NT and
24OS/2, MS-DOS Kermit for PCs with DOS and Windows 3.x, and IBM Mainframe
25Kermit-370 for VM/CMS, MVS/TSO, and CICS.  C-Kermit itself also runs on
26Digital VMS, Data General AOS/VS, Stratus VOS, OS-9, QNX, the BeBox, Plan 9,
27the Commodore Amiga, and elsewhere.  Together, C-Kermit, Kermit 95, MS-DOS
28Kermit, and IBM Mainframe Kermit offer a consistent and nearly universal
29approach to inter-computer communications.
31C-Kermit 6.0.192 is Copyright (C) 1985, 1996 by the Trustees of Columbia
32University in the City of New York.  The C-Kermit software may not be, in
33whole or in part, licensed or sold for profit as a software product itself,
34nor may it be included in or distributed with commercial products or otherwise
35distributed by commercial concerns to their clients or customers without
36written permission of the Office of Kermit Development and Distribution,
37Columbia University.  This copyright notice must not be removed, altered, or
41C-Kermit 6.0 is thoroughly documented in the book
42.IR "Using C-Kermit"
43by Frank da Cruz and Christine M. Gianone, Digital Press, Second Edition,
441997; see REFERENCES
45at the end of this manual page.  This manual page is not a substitute for the
46book.  If you are a serious user of C-Kermit, particularly if plan to write
47C-Kermit script programs, you should purchase the manual.  Book sales are the
48primary source of funding for the nonprofit Kermit Project.
50Any new features added since most recent edition of the book was
51published are documented in the online file
52.IR "ckermit.upd".
53Hints, tips, limitations, restrictions are listed in
54.IR "ckcker.bwr"
55(general C-Kermit) and
56.IR "ckuker.bwr"
57(UNIX-specific); see FILES below.  Please consult all of these references
58before reporting problems or asking for technical support.
60Kermit software is available for hundreds of different computers and operating
61systems from Columbia University.  For best file-transfer results, please use
62C-Kermit in conjunction with real Columbia University Kermit software on other
63computers, such as Kermit 95 for Windows 95 and NT or MS-DOS Kermit for DOS
643.x or Windows.  See CONTACTS below.
66C-Kermit can be used in two "modes": remote and local.  In
67.IR "remote mode",
68you connect to the
70system from a desktop computer
71and transfer files between your desktop computer and
73C-Kermit.  In that
74case, connection establishment (dialing, TELNET connection, etc) is handled
75by the Kermit program on your desktop computer.
78.IR "local mode",
79C-Kermit establishes a connection to another computer
80by direct serial connection, by dialing a modem, or by making a network
81connection.  When used in local mode, C-Kermit gives you a terminal connection
82to the remote computer, using your actual terminal, emulator, or UNIX
83workstation terminal window or console driver for specific terminal emulation.
85C-Kermit also has two types of commands: the familiar UNIX-style command-line
86options, and an interactive dialog with a prompt.
87.IR "Command-line options"
89you access to a small but useful subset of C-Kermit's features for terminal
90connection and file transfer, plus the ability to pipe files into or out of
91Kermit for transfer.
93.IR "Interactive commands"
94give you access to dialing, script programming,
95character-set translation, and, in general, detailed control and display of all
96C-Kermit's features.  Interactive commands can also be collected into command
97files or macros.
101C-Kermit should be available as "kermit" somewhere in your PATH, perhaps as
102/usr/local/bin/kermit, in which case you can
103start C-Kermit just by typing "kermit", possibly followed by command-line
105If there are no "action options" on the command line (explained
106below), C-Kermit starts in interactive command mode; you will see a greeting
107message and then the "C-Kermit>" prompt.  If you do include action options on
108the command line, C-Kermit takes the indicated actions and then exits directly
109back to UNIX.  Either way, C-Kermit executes the commands in its
110initialization file,
111.IR ".kermrc" ,
112in your home directory (or a system-wide directory if C-Kermit was built to
113do this)
114before it executes any other commands, unless you have
115included the `\|\c
116.B \-Y\c
117\&\|' (uppercase) command-line option, which means to skip the
118initialization file, or you have included the `\|\c
119.B -y \c
121.IR "filename" \c
123option to specify an alternative initialization file.
127Here is the most common scenario for Kermit file transfer.  Many other
128methods are possible, most of them more convenient, but this basic method
129should work in all cases.
130.PP +0.5i
132.ll -0.5i
133.ta +0.2i
134.ti -0.2i
135\(bu    Start Kermit on your local computer and establish a connection to the
136remote computer.  If C-Kermit is on your local
137computer, use the sequence SET MODEM TYPE
138.IR "modem-name" \c
139\&\|, SET LINE
140.IR "device-name" \c
141\&\|, SET SPEED
142.IR "bits-per-second" \c
143\&\|, and DIAL
144.IR "phone-number"
145if you are dialing; SET LINE and SPEED for direct connections;
147.IR "network-type"
148and SET HOST
149.IR "host-name-or-address"
150for network connections.
152.ti -0.2i
153\(bu    SET any other necessary communication parameters, such as PARITY,
156.ti -0.2i
157\(bu    Give the CONNECT command.
159.ti -0.2i
160\(bu    Log in to the remote computer.
162.ti -0.2i
163\(bu    Start Kermit on the remote computer, give it any desired SET commands
164for file-, communication-, or protocol-related parameters.  If you will be
165transferring binary files, give the command SET FILE TYPE BINARY to the
166Kermit program that will be sending them.
168.ti -0.2i
169\(bu    To
170.IR download
171a file or file group, give the remote Kermit a SEND command, following by
172a filename or "wildcard" file specification, for example:
175  send oofa.txt            (send one file)
181  send oofa.*              (send a group of files)
185.IR upload
186a file or files, give the remote Kermit a RECEIVE command.  The sending Kermit
187will tell the receiving Kermit the name (and other attributes) of each file.
189.ti -0.2i
190\(bu    Escape back to the Kermit program on your local (desktop) computer.  If
191your local computer is running C-Kermit, type Ctrl-\\ c (Control-backslash
192followed by the letter 'c') (on NeXT workstations, use Ctrl-] c).  If MS-DOS
193or OS/2 or Windows Kermit, use Alt-x (hold down the Alt key, press 'x').  Now
194you should see your local Kermit program's prompt.
196.ti -0.2i
197\(bu    If you will be transferring binary files, give the command SET FILE
198TYPE BINARY to the Kermit program that is sending the files.
200.ti -0.2i
201\(bu    If you are
202.IR downloading
203files, tell the local Kermit program to RECEIVE.  If you are
204.IR "uploading",
205give your local Kermit program a SEND command, specifying a filename
206or wildcard file specification.  In other words, tell the
207.IR remote
208Kermit program what to do first, SEND or RECEIVE, then escape back to
210.IR local
211Kermit and give it the opposite command, RECEIVE or SEND.
213.ti -0.2i
214\(bu When the transfer is complete, give a CONNECT command.  Now you are
215talking to Kermit on the remote computer again.  Type EXIT to get back to the
216command prompt on the remote computer.  When you are finished using the remote
217computer, log out and then (if necessary) escape back to Kermit on your local
218computer.  Then you can make another connection or EXIT from the local Kermit
220.ll +0.5i -0.5i
224C-Kermit's file transfer protocol defaults are deliberately conservative,
225resulting in file transfer that almost always works, but might be somewhat
226slow.  To increase file transfer performance on computers and connections that
227permit it, use SET RECEIVE PACKET-LENGTH to increase the packet length, SET
228WINDOW to increase the packet window size, and use SET PREFIXING to reduce the
229overhead of control-character prefixing.  (Hint: try the
231command to enable all these performance options at once.)  On serial
232connections, use hardware flow control (SET FLOW RTS/CTS) if available, rather
233than software (XON/XOFF) flow control.  On TCP/IP connections, SET FLOW NONE.
234For details, including benchmarks, read Chapter 12 of
235.IR "Using C-Kermit".
237C-Kermit includes features too numerous to be explained in a man page.  For
238further information about connection establishment, modem dialing, networks,
239terminal connection, key mapping, logging, file transfer options and features,
240troubleshooting, client/server operation, character-set translation during
241terminal connection and file transfer, "raw" up- and downloading of files,
242macro construction, script programming, convenience features, and shortcuts,
243plus numerous tables, examples, and illustrations, please consult
244.IR "Using C-Kermit".
247C-Kermit has extensive built-in help.  You can find out what commands exist by
248typing ? at the C-Kermit> prompt.  You can type HELP at the C-Kermit> prompt
249for "getting-started" message, or HELP followed by the name
250of a particular command for information about that command, for example:
253  help send
259  help set file
262You can type ? anywhere within a command to get brief help about the
263current command field.  You can also type the INTRO command to get a brief
264introduction to C-Kermit, and the NEWS command to find out what's new in
265your version.  Finally, you can use the BUG command to learn how to report
270You can use upper or lower case for interactive-mode commands, but remember
271that UNIX filenames are case-sensitive.  You can abbreviate commands as long
272as the abbreviation matches only one possibility.  While typing a command, you
273can use the following editing characters:
276  Delete, Backspace, or Rubout erases the rightmost character.
277  Ctrl-W erases the rightmost "word".
278  Ctrl-U erases the current command line.
279  Ctrl-R redisplays the current command.
280  Ctrl-P recalls a previous command (scrolls back in command buffer).
281  Ctrl-N scrolls forward in a scrolled-back command buffer.
282  Ctrl-C cancels the current command.
283  Tab, Esc, or Ctrl-I tries to complete the current keyword or filename.
284  ? gives help about the current field.
287To enter the command and make it execute, press the Return or Enter key.
290Within an interactive command, the "\\" character (backslash) is a prefix used
291to enter special quantities, including ordinary characters that would
292otherwise be illegal.  At the end of a line, \\ or - (dash) makes the next
293line a continuation of the current line.  Other than that, the character
294following the \\ identifies what the special quantity is:
297  % A user-defined simple (scalar) variable such as \\%a or \\%1
298  & an array reference such as \\&a[3]
299  $ an environment variable such as \\$(TERM)
300  v (or V) a built-in variable such as \\v(time)
301  f (or F) a function such as \\Fsubstring(\\%a,3,2)
302  d (or D) a decimal (base 10) number (1 to 3 digits, 0..255) such as \\d27
303  o (or O) an octal (base 8) number (1 to 3 digits, 0..377) such as \\o33
304  x (or X) a hexadecimal (base 16) number (2 digits, 00..ff) like \\x1b
305  \\ the backslash character itself
306  b (or B) the BREAK signal (OUTPUT command only)
307  l (or L) a Long BREAK signal (OUTPUT only)
308  n (or n) a NUL (0) character (OUTPUT only)
309  a decimal digit (a 1-, 2-, or 3-digit decimal number) such as \\27
310  {} used for grouping, e.g. \\{27}123
311  anything else: following character taken literally.
314Note that numbers turn into the character with that binary code (0-255), so
315you can use \\7 for a bell, \\13 for carriage return, \\10 for linefeed.
316For example, to have C-Kermit send a BELL to your screen, type:
319  echo \\7
324The commands most commonly used, and important for beginners to
325know, are marked with "*": 0
328.ll 80
329.ta 16
331Program Management:
332  BUG   Learn how to report bugs.
333  CHECK See if a particular feature is configured.
334  CLOSE Close a log or other local file.
335  COMMENT       Introduce a full-line comment.
336  DATE  Display current date & time.
337* EXIT  Leave the program, return to UNIX.
338* HELP  Display a help message for a given command.
339* INTRO Print a brief introduction to C-Kermit.
340  LOG   Open a log file -- debugging, packet, session, transaction.
341  PUSH  Invoke local system's interactive command interpreter.
342  QUIT  Synonym for EXIT.
343  REDIRECT      Redirect standard i/o of command to communication device.
344  RUN   Run a program or system command.
345  SET COMMAND   Command-related parameters: bytesize, recall buffer size.
346  SET DEBUG     Log or display debugging information.
347  SET EXIT      Items related to C-Kermit's action upon exit or SET LINE/HOST.
348  SET PROMPT    The C-Kermit program's interactive command prompt.
349  SHOW EXIT     Display SET EXIT parameters.
350  SHOW FEATURES Show features that C-Kermit was built with.
351  SHOW VERSIONS Show version numbers of each source module.
352  SUSPEND       Suspend Kermit (use only if shell supports job control!).
353* SHOW  Display values of SET parameters.
354* TAKE  Execute commands from a file.
355  VERSION       Display the C-Kermit program version number.
356  Z     Synonym for SUSPEND.
357  Ctrl-C        Interrupt a C-Kermit command in progress.
358  Ctrl-Z        Synonym for SUSPEND.
359  ; or #        Introduce a full-line or trailing comment.
360  ! or @        Synonym for RUN.
361  <     Synonym for REDIRECT.
363Connection Establishment and Release:
364* DIAL  Dial a telephone number.
365* HANGUP        Hang up the phone or network connection.
366  PAD   Command for X.25 PAD (SunOS / Solaris / VOS only).
367  PING  Check status of remote TCP/IP host.
368  REDIAL        The the most recently DIALed number again.
369  SET CARRIER   Treatment of carrier on terminal connections.
370* SET DIAL      Parameters related to modem dialing.
371* SET FLOW      Communication line flow control: AUTO, RTS/CTS, XON/XOFF, etc.
372* SET HOST      Specify remote network host name or address.
373* SET LINE      Specify serial communication device name, like /dev/cua.
374* SET MODEM TYPE        Specify type of modem on SET LINE device, like HAYES.
375* SET NETWORK   Network type, TCP/IP or X.25 (SunOS / Solaris / VOS only).
376  SET TCP       Specify TCP protocol options (advanced).
377  SET TELNET    Specify TELNET protocol options.
378  SET PAD       X.25 X.3 PAD parameters (SunOS / Solaris / VOS only).
379* SET PARITY    Character parity (none, even, etc) for communications.
380* SET SPEED     Serial communication device speed, e.g. 2400, 9600, 57600.
381  SET X.25      Specify X.25 connection parameters (SunOS/Solaris/VOS only).
382  SHOW COMM     Display all communications settings.
383  SHOW DIAL     Display SET DIAL values.
384  SHOW MODEM    Display modem type, signals, etc.
385  SHOW NETWORK  Display network-related items.
387  TELOPT        Send a TELNET option negotiation (advanced).
389Terminal Connection:
390* C     Special abbreviation for CONNECT.
391* CONNECT       Establish a terminal connection to a remote computer.
392  SET COMMAND   Bytesize between C-Kermit and your keyboard and screen.
393* SET DUPLEX    Specify which side echoes during CONNECT.
394  SET ESCAPE    Prefix for "escape commands" during CONNECT.
395  SET KEY       Key mapping and macros for use in CONNECT mode.
396  SET TERMINAL  Terminal connection items: bytesize, character-set, echo, etc.
397  SHOW ESCAPE   Display current CONNECT-mode escape character.
398  SHOW KEY      Display keycode and assigned value or macro.
400* Ctrl-\\       CONNECT-mode escape character, follow by another character:
401          C to return to C-Kermit> prompt.
402          B to send BREAK signal.
403          ? to see other options.
405File Transfer:
406  ADD   Add a file specification to the SEND-LIST
407  LOG SESSION   Download a file with no error checking.
408  MOVE  Send a file and then delete it
409  MMOVE Multiple MOVE - accepts a list of files, separated by spaces.
410  MSEND Multiple SEND - accepts a list of files, separated by spaces.
411* RECEIVE       Passively wait for files to arrive from other Kermit.
412* R     Special abbreviation for RECEIVE.
413* SEND  Send files.
414* S     Special abbreviation for SEND.
415  REGET Continue a incomplete download from a server.
416  RESEND        Continue a incomplete upload.
417  PSEND Send part of a file.
418  SET ATTRIB    Control transmission of file attributes.
419* SET BLOCK     Choose error-checking level, 1, 2, or 3.
420  SET BUFFERS   Size of send and receive packet buffers.
421  SET PREFIX    Which control characters to "unprefix" during file transfer.
422  SET DELAY     How long to wait before sending first packet.
423  SET DESTINATION       DISK, PRINTER, or SCREEN for incoming files.
424* SET FILE      Transfer mode (type), character-set, collision action, etc.
425* SET RECEIVE   Parameters for inbound packets: packet-length, etc.
426  SET REPEAT    Repeat-count compression parameters.
427  SET RETRY     Packet retransmission limit.
428  SET SEND      Parameters for outbound packets: length, etc.
429  SET HANDSHAKE Communication line half-duplex packet turnaround character.
430  SET LANGUAGE  Enable language-specific character-set translations.
431  SET SESSION-LOG       File type for session log, text or binary.
432  SET TRANSFER  File transfer parameters: character-set, display, etc.
433  SET TRANSMIT  Control aspects of TRANSMIT command execution.
434  SET UNKNOWN   Specify handling of unknown character sets.
435* SET WINDOW    File transfer packet window size, 1-31.
436  SHOW ATTRIB   Display SET ATTRIBUTE values.
437  SHOW CONTROL  Display control-character prefixing map.
438* SHOW FILE     Display file-related settings.
439  SHOW PROTOCOL Display protocol-related settings.
440  SHOW LANGUAGE Display language-related settings.
442* STATISTICS    Display statistics about most recent file transfer.
443  TRANSMIT      Upload a file with no error checking.
444  XMIT  Synonym for TRANSMIT.
446File Management:
447* CD    Change Directory.
448* DELETE        Delete a file or files.
449* DIRECTORY     Display a directory listing.
450  MAIL  Send a file to other Kermit, to be delivered as e-mail.
451  PRINT Print a local file on a local printer.
452* PWD   Display current working directory.
453  RENAME        Change the name of a local file.
454  SET PRINTER   Choose printer device.
455  SPACE Display current disk space usage.
456  SHOW CHARACTER-SETS   Display character-set translation info.
457  TRANSLATE     Translate a local file's character set.
458  TYPE  Display a file on the screen.
459  XLATE Synonym for TRANSLATE.
461Client/Server operation:
462  BYE   Terminate a remote Kermit server and log out its job.
463  DISABLE       Disallow access to selected features during server operation:
464  E-PACKET      Send an Error packet.
465  ENABLE        Allow access to selected features during server operation.
466  FINISH        Instruct a remote Kermit server to exit, but not log out.
467  G     Special abbreviation for GET.
468  GET   Get files from a remote Kermit server.
469  RETRIEVE      Like GET but server deletes files after.
470  REMOTE xxx    Command for server, can be redirected with > or |.
471  REMOTE CD     Tell remote Kermit server to change its directory.
472  REMOTE ASSIGN Assign a variable
473  REMOTE DELETE Tell server to delete a file.
474  REMOTE DIRECTORY      Ask server for a directory listing.
475  REMOTE HELP   Ask server to send a help message.
476  REMOTE HOST   Ask server to ask its host to execute a command.
477  REMOTE KERMIT Send an interactive Kermit command to the server.
478  REMOTE LOGIN  Authenticate yourself to a remote Kermit server.
479  REMOTE LOGOUT Log out from a Kermit server previously LOGIN'd to.
480  REMOTE PRINT  Print a local file on the server's printer.
481  REMOTE QUERY  Get value of a variable.
482  REMOTE SET    Send a SET command to a remote server.
483  REMOTE SPACE  Ask server how much disk space it has left.
484  REMOTE TYPE   Ask server to display a file on your screen.
485  REMOTE WHO    Ask server for a "who" or "finger" listing.
486  SERVER        Be a Kermit server.
487  SET SERVER    Parameters for server operation.
490Script programming:
491  ASK   Prompt the user, store user's reply in a variable.
492  ASKQ  Like ASK, but, but doesn't echo (useful for passwords).
493  ASSIGN        Assign an evaluated string to a variable or macro.
494  CLEAR Clear communication device input buffer.
495  CLOSE Close a log or other local file.
496  DECLARE       Declare an array.
497  DECREMENT     Subtract one (or other number) from a variable.
498  DEFINE        Define a variable or macro.
499  DO    Execute a macro ("DO" can be omitted).
500  ECHO  Display text on the screen.
501  ELSE  Used with IF.
502  END   A command file or macro.
503  EVALUATE      an arithmetic expression.
504  FOR   Execute commands repeatedly in a counted loop.
505  FORWARD       GOTO in the forward direction only.
506  GETC  Issue a prompt, get one character from keyboard.
507  GETOK Ask question, get Yes or No answer, set SUCCESS or FAILURE.
508  GOTO  Go to a labeled command in a command file or macro.
509  IF    Conditionally execute the following command.
510  INCREMENT     Add one (or other number) to a variable.
511  INPUT Match characters from another computer against a given text.
512  LOCAL Declares local variables in a macro
513  MINPUT        Like INPUT, but allows several match strings.
514  MSLEEP        Sleep for given number of milliseconds.
515  OPEN  Open a local file for reading or writing.
516  O     Special abbreviation for OUTPUT.
517  OUTPUT        Send text to another computer.
518  PAUSE Do nothing for a given number of seconds.
519  READ  Read a line from a local file into a variable.
520  REINPUT       Reexamine text previously received from another computer.
521  RETURN        Return from a user-defined function.
522  SCRIPT        Execute a UUCP-style login script.
523  SET ALARM     Set a timer to be used with IF ALARM; SHOW ALARM shows it.
524  SET CASE      Treatment of alphabetic case in string comparisons.
525  SET COMMAND   QUOTING turns on/off interpretation of backslash notation.
526  SET COUNT     For counted loops.
527  SET INPUT     Control behavior of INPUT command.
528  SET MACRO     Control aspects of macro execution.
529  SET TAKE      Control aspects of TAKE file execution.
530  SHOW ARGUMENTS        Display arguments to current macro.
531  SHOW ARRAYS   Display information about active arrays.
532  SHOW COUNT    Display current COUNT value.
533  SHOW FUNCTIONS        List names of available \\f() functions.
534  SHOW GLOBALS  List defined global variables \\%a..\\%z.
535  SHOW MACROS   List one or more macro definitions.
536  SHOW SCRIPTS  Show script-related settings.
537  SHOW VARIABLES        Display values all \\v() variables.
538  SLEEP Sleep for given number of seconds.
539  STOP  Stop executing macro or command file, return to prompt.
540  UNDEFINE      Undefine a variable
541  WAIT  Wait for the specified modem signals.
542  WHILE Execute commands repeatedly while a condition is true.
543  WRITE Write material to a local file.
544  WRITE-LINE    Write a line (record) to a local file.
545  WRITELN       Synonym for WRITE-LINE.
546  XECHO Like ECHO but no CRLF at end.
547  XIF   Extended IF command.
552Built-in variables are referred to by \\v(name), can be used in any command,
553usually used in script programming.  They cannot be changed.  Type SHOW
554VARIABLES for a current list.
557  \\v(argc)      number of arguments in current macro
558  \\v(args)      number of program command-line arguments
559  \\v(charset)   current file character-set
560  \\v(cmdfile)   name of current command file, if any
561  \\v(cmdlevel)  current command level
562  \\v(cmdsource) where command are currently coming from, macro, file, etc.
563  \\v(cols)      number of screen columns
564  \\v(connection)connection type: serial, tcp/ip, etc.
565  \\v(count)     current COUNT value
566  \\v(cps)       speed of most recent file transfer in chars per second
567  \\v(cpu)       CPU type C-Kermit was built for
568  \\v(crc16)     16-bit CRC of most recent file transfer
569  \\v(d$ac)      SET DIAL AREA-CODE value
570  \\v(d$cc)      SET DIAL COUNTRY-CODE value
571  \\v(d$ip)      SET DIAL INTL-PREFIX value
572  \\v(d$lc)      SET DIAL LD-PREFIX value
573  \\v(date)      date as 8 Feb 1993
574  \\v(day)       day of week
575  \\v(directory) current/default directory
576  \\v(dialstatus)return code from DIAL command (0 = OK, 22 = BUSY, etc)
577  \\v(download)  current download directory if any
578  \\v(errno)     current "errno" (system error number) value
579  \\v(errstring) error message string associated with errno
580  \\v(evaluate)  result of most recent EVALUATE command
581  \\v(exitstatus)current EXIT status (0 = good, nonzero = something failed)
582  \\v(filespec)  filespec given in most recent SEND/RECEIVE/GET command
583  \\v(fsize)     size of file most recently transferred
584  \\v(ftype)     SET FILE TYPE value (text, binary)
585  \\v(home)      home directory
586  \\v(host)      computer host name (comuter where C-Kermit is running)
587  \\v(input)     current INPUT buffer contents
588  \\v(inchar)    character most recently INPUT
589  \\v(incount)   how many characters arrived during last INPUT
590  \\v(inidir)    directory where initialization file was found
591  \\v(instatus)  status of most recent INPUT command
592  \\v(line)      current communications device, set by LINE or HOST
593  \\v(local)     0 if in remote mode, 1 if in local mode
594  \\v(macro)     name of currently executing macro, if any
595  \\v(minput)    Result of most recent MINPUT command
596  \\v(modem)     Current modem type
597  \\v(m_aa_off)  Modem command to turn autoanswer off
598  \\v(m_aa_on)   Modem command to turn autoanswer on
599  \\v(m_dc_off)  Modem command to turn data compression off
600  \\v(m_dc_on)   Modem command to turn data compression on
601  \\v(m_dial)    Telephone number most recently dialed
602  \\v(m_ec_off)  Modem command to turn error correction off
603  \\v(m_ec_on)   Modem command to turn error correction on
604  \\v(m_fc_hw)   Modem command to turn hardware flow control on
605  \\v(m_fc_no)   Modem command to turn flow control off
606  \\v(m_fc_sw)   Modem command to turn software flow control on
607  \\v(m_hup)     Modem command to hang up connection
608  \\v(m_init)    Modem initialization string
609  \\v(m_pulse)   Modem command to select pulse dialing
610  \\v(m_tone)    Modem command to select tone dialing
611  \\v(ndate)     Current date as 19930208 (yyyymmdd)
612  \\v(nday)      Numeric day of week (0 = Sunday)
613  \\v(newline)   System-independent newline character or sequence
614  \\v(ntime)     Current local time in seconds since midnight (noon = 43200)
615  \\v(packetlen) Current SET RECEIVE PACKET-LENGTH value
616  \\v(parity)    Current parity setting
617  \\v(platform)  Specific machine and/or operating system
618  \\v(program)   Name of this program ("C-Kermit")
619  \\v(query)     Result of most recent REMOTE QUERY command
620  \\v(protocol)  Currently selected file transfer protocol
621  \\v(return)    Most recent RETURN value
622  \\v(rows)      Number of rows on the terminal screen
623  \\v(speed)     Current speed, if known, or "unknown"
624  \\v(status)    0 or 1 (SUCCESS or FAILURE of previous command)
625  \\v(sysid)     Kermit attribute code for system ID
626  \\v(system)    UNIX
627  \\v(terminal)  Terminal type
628  \\v(tfsize)    Total size of file group most recently transferred
629  \\v(time)      Time as 13:45:23 (hh:mm:ss)
630  \\v(tmpdir)    Temporary directory
631  \\v(ttyfd)     File descriptor of current communication device
632  \\v(version)   Numeric version of Kermit, e.g. 501190.
633  \\v(window)    Current window size (SET WINDOW value)
636Builtin functions are invoked as \\Fname(args), can be used in any command,
637and are usually used in script programs.  Type SHOW FUNCTIONS for a current
641   \\Fbasename(file)    basename of file
642   \\Fbreak(s,c)        left substring of s up to 1st occurence of char c
643   \\Fcapitalize(s)     uppercase first letter of s and lowercase the rest
644   \\Fcharacter(arg)    convert numeric arg to character
645   \\Fchecksum(s)       32-bit arithmetic checksum of string s
646   \\Fcode(char)        numeric code for character
647   \\Fcontents(v)       return current definition of variable
648   \\Fcrc16(s)          16-bit CRC of string s
649   \\Fdate(filename)    return file's modification date/time
650   \\Fdefinition(m)     return current definition of macro
651   \\Feval(expr)        evaluate arithmetic expression
652   \\Fexecute(m,a,b,..) execute macro "m" with arguments "a", "b", etc
653   \\Ffiles(f)          number of files matching file spec
654   \\Fhexify(s)         translate s into a hexadecimal string
655   \\Findex(a1,a2,a3)   position of string a1 in a2, starting at pos a3
656   \\Fipaddress(s)      returns first IP address from string s
657   \\Flength(arg)       length of the string "arg"
658   \\Fliteral(arg)      copy argument literally, no evaluation
659   \\Flower(arg)        convert to lower case
660   \\Flpad(text,n,c)    left pad text to length n with char c
661   \\Fltrim(s)          Trim whitespace from left of s
662   \\Fmax(a1,a2)        max of two numbers
663   \\Fmin(a1,a2)        min of two numbers
664   \\Fmodulus(n1,n2)    modulus n2 of integer n1
665   \\Fnextfile()        next file name from list in last \\Ffiles()
666   \\Fpathname(file)    full pathname of file
667   \\Frepeat(a1,a2)     repeat a1 a2 times
668   \\Freplace(a1,a2,a3) replace a2 by a3 in a1
669   \\Freverse(arg)      reverse characters in arg
670   \\Fright(a1,a2)      rightmost a2 characters of string a1
671   \\Frindex(a1,a2,a3)  like \\Findex, but searching from right
672   \\Frpad(text,n,c)    right pad text to length n with char c
673   \\Fsize(filename)    return file's length in bytes
674   \\Fspan(a1,a2)       left substring of a1 containing only chars from a2
675   \\Fsubstr(a1,a2,a3)  substring of a1, starts at a2, length a3
676   \\Ftod2secs(s)       converts hh:mm:ss to seconds since midnight
677   \\Ftrim(s)           removes trailing whitespace from s
678   \\Funhexify(s)       converts a hexacimal string s back to original
679   \\Fupper(s)          converts s to upper case
680   \\Fverify(a1,a2,n)   returns index of 1st char in a2 that is not in a1
681                        starting at position n of a2.
684\\Feval() allows the following operators in the expression.  The expression
685can contain variables.  Only integer arithmetic is supported.
686Precedences are shown as numbers, 1 is highest
687precedence, 6 is lowest. +.2i
690.ta \w'n @ n  'u +\w'5   'u
692( )     1       parentheses
693n !     2       factorial
694~ n     3       logical NOT
695- n     4       negative
696n ^ n   4       power
697n * n   5       multiplication
698n / n   5       division
699n % n   5       modulus
700n & n   5       logical AND
701n + n   6       plus
702n - n   6       minus
703n | n   6       logical OR
704n # n   6       exclusive OR
705n @ n   6       greatest common divisor
710C-Kermit accepts commands (or "options") on the command line, in the
711time-honored UNIX style.  Alphabetic case is significant.  All options
712are optional.  If one or more action options are included, Kermit exits
713immediately after executing the command-line options, otherwise it enters
714interactive command mode.
716.ll 80
718  kermit [filename] [-x arg [-x arg]...[-yyy]..]]
722  filename is the name of a command file to execute,
723  -x is an option requiring an argument,
724  -y an option with no argument.
725.ta 15
728  -s files      send files
729  -s -  send files from stdin
730  -r    receive files
731  -k    receive files to stdout
732  -x    enter server mode
733  -f    finish remote server
734  -g files      get remote files from server (quote wildcards)
735  -a name       alternate file name, used with -s, -r, -g
736  -c    connect (before file transfer), used with -l or -j
737  -n    connect (after file transfer), used with -l or -j
740  -l line       communication line device (to make a serial connection)
741  -l n  open file descriptor of communication device
742  -j host       TCP/IP network host name (to make a network connection)
743  -J host       Connect like TELNET, exit when connection closes
744  -l n  open file descriptor of TCP/IP connection (n = number)
745  -X    X.25 network address
746  -Z    open file descriptor of X.25 connection
747  -o n  X.25 closed user group call info
748  -u    X.25 reverse-charge call
749  -q    quiet during file transfer
750  -8    8-bit clean
751  -i    transfer files in binary mode
752  -T    transfer files in text mode
753  -b bps        serial line speed, e.g. 1200
754  -m name       modem type, e.g. hayes
755  -p x  parity, x = e,o,m,s, or n
756  -t    half duplex, xon handshake
757  -e n  receive packet-length
758  -v n  window size
759  -Q    Quick file-transfer settings
760  -w    write over files of same name, don't backup old file
761  -D n  delay n seconds before sending a file
764  -y name       alternate init file name
765  -Y    Skip init file
766  -R    Advise C-Kermit it will be used only in remote mode
767  -d    log debug info to file debug.log
768  -S    Stay, don't exit, after action command
769  -C "cmds"     Interactive-mode commands, comma-separated
770  -z    Force foreground operation
771  -B    Force background (batch) operation
772  -h    print command-line option help screen
773  =     Ignore all text that follows
775Remote-mode example (C-Kermit is on the far end):
778  kermit -v 4 -i -s oofa.bin
781sends file oofa.bin in binary mode (-i) using a window size of 4 (-v 4).
783Local-mode example (C-Kermit makes the connection):
786  kermit -l /dev/tty01 -b 19200 -c -r -n
789makes a 19200-bps direct connection out through /dev/tty01, CONNECTs (-c) so you
790can log in and, presumably start a remote Kermit program and tell it to send a
791file, then it RECEIVEs the file (-r), then it CONNECTs back (-n) so you can
792finish up and log out.
794For dialing out, you must specify a modem type, and you might have to use a
795different device name:
798  kermit -m hayes -l /dev/cua -b 2400 -c -r -n
804.ta 16
805$HOME/.kermrc   Standard C-Kermit initialization commands.
806$HOME/.mykermrc Your personal C-Kermit customization file.
807$HOME/.kdd      Your personal dialing directory.
808$HOME/.ksd      Your personal services directory.
811The following should be in a publicly accessible plain-text documentation area,
812such as usr/local/lib/kermit, /usr/local/doc, or /usr/share/lib/kermit, or
813available via an information server such as gopher, or by ftp from Columbia:
815.ta 16
817ckaaaa.hlp      Explanation of C-Kermit files.
818ckermit.ini     Standard initialization file.
819ckermod.ini     Sample C-Kermit customization file.
820ckermit.kdd     Sample dialing directory.
821ckermit.ksd     Sample services directory.
822ckermit.upd     Supplement to "Using C-Kermit".
823ckcker.bwr      C-Kermit "beware" file - hints & tips.
824ckuker.bwr      UNIX-specific beware file.
825ckedemo.ini     Demonstration macros from "Using C-Kermit".
826ckevt.ini       Ditto.
827ckepager.ksc    Alpha pager script.
830If C-Kermit has not been installed on your system with the system-wide
831initialization file feature, then the ckermit.ini file should be copied to
832your home (login) directory and renamed to
833.IR ".kermrc" .
834You should not modify
835this file.
837To make
838.IR "personalized customizations" ,
839copy the file
841file to your home directory, make any desired changes, and rename it to
842.IR ".mykermrc" .
844You may also create a personalized
845.IR "dialing directory"
846like the sample one in
848Your personalized dialing directory
849should be stored in your home directory as
850.IR ".kdd"
851and your personal network directory as
852.IR ".knd" .
853See Chapters 5 and 6 of
854.IR "Using C-Kermit"
855for details.
857And you may also create a personalized
858.IR "services directory"
859like the sample one in
861Your personalized services directory should be stored in your home directory as
862.IR ".ksd" .
863See Chapter 7 of
864.I "Using C-Kermit"
865for instructions.
867The demonstration files illustrate C-Kermit's script programming constructs;
868they are discussed in chapters 17-19 of the book.  You can run them by typing
869the appropriate TAKE command at the C-Kermit> prompt, for example:
870"take /usr/share/lib/kermit/ckedemo.ini".
873Frank da Cruz, Columbia University, with contributions from hundreds of
874other volunteer programmers all over the world.  See Acknowledgements in
875.IR "Using C-Kermit".
878Frank da Cruz and Christine M. Gianone,
879.IR "Using C-Kermit",
880Second Edition, 1997, 622 pages,
881Digital Press / Butterworth-Heinemann, 225 Wildwood Street,
882Woburn, MA 01801, USA.
883ISBN 1-55558-164-1.  (In the USA, call +1 800 366-2665 to order Digital Press
884books.)  Also available in a German edition from Verlag Heinze Heise,
888Frank da Cruz,
889.IR "Kermit, A File Transfer Protocol",
890Digital Press / Butterworth-Heinemann, Woburn, MA, USA (1987).
891ISBN 0-932376-88-6.  The Kermit file transfer protocol specification.
893Christine M. Gianone,
894.IR "Using MS-DOS Kermit",
895Digital Press / Butterworth-Heinemann, Woburn, MA, USA (1992).
896ISBN 1-5558-082-3.  Also available in a German edition from Heise, and a
897French edition from Heinz Schiefer & Cie, Versailles.
899.IR "Kermit News",
900Issues 4 (1990) and 5 (1993), Columbia University,
901for detailed discussions of Kermit file transfer performance.
903The diagnostics produced by
904.I C-Kermit
905itself are intended to be self-explanatory.  In addition, every command
906returns a SUCCESS or FAILURE status that can be tested by IF FAILURE or
907IF SUCCESS.  In addition, the program itself returns an exit status code of
9080 upon successful operation or nonzero if any of various operations failed.
910See the comp.protocols.kermit.* newsgroups on Usenet for discussion, or the
911files ckcker.bwr and ckuker.bwr, for a list of bugs, hints, tips. etc.  Report
912bugs via e-mail to
914For more information about Kermit software and documentation, visit the
915Kermit Web site:
921Or write to:
924  The Kermit Project
925  Columbia University
926  612 West 115th Street
927  New York NY  10025-7799
928  USA
931Or send e-mail to
932Or call +1 212 854-3703.  Or fax +1 212 663-8202.
Note: See TracBrowser for help on using the repository browser.