source: trunk/third/kermit/ckuker.nr @ 20081

Revision 20081, 60.9 KB checked in by zacheiss, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20080, which included commits to RCS files with non-trunk default branches.
Line 
1.\" @(#) kermit.1 8.0.208 2003/03/14 Columbia University
2.TH KERMIT 1 "MARCH 2003" "User Manuals"
3.na
4.SH NAME
5kermit \-
6.B C-Kermit 8.0:
7transport- and platform-independent
8interactive and scriptable communications software.
9.IP
10
11This document is intended to give the beginner sufficient information to make
12basic (if not advanced) use of C-Kermit 8.0.  Although it might be rather long
13for a Unix manual page, it's still far shorter than the C-Kermit manual, which
14should be consulted for advanced topics such as customization, character-sets,
15scripting, etc. We also attempt to provide a clear structural overview of
16C-Kermit's many capabilities, functional areas, states, and modes and their
17interrelation, that should be helpful to beginners and veterans alike, as well
18as to those upgrading to version 8.0 from earlier releases.
19.PP
20This document is also available as a Web page at:
21.IP
22http://www.columbia.edu/kermit/ckututor.html
23.SH DESCRIPTION
24C-Kermit is an all-purpose communications software package from the Kermit
25Project at Columbia University that:
26.PP
27.nf
28\(bu    Is portable to many platforms, Unix and non-Unix alike.
29.br
30\(bu    Can make both serial and network connections.
31.br
32\(bu    Can conduct interactive terminal sessions over its connection.
33.br
34\(bu    Can transfer text or binary files over the same connection.
35.br
36\(bu    Can convert character sets in the terminal session.
37.br
38\(bu    Can convert character sets during text-file file transfer.
39.br
40\(bu    Is customizable in every aspect of its operation.
41.fi
42.PP
43C-Kermit is a modem program, a Telnet client, an Rlogin client, an FTP
44client, an HTTP client, and on selected platforms, also an X.25 client. It
45can make its own secure Internet connections using IETF-approved security
46methods including Kerberos IV, Kerberos V, SSL/TLS, and SRP and it can also
47make SSH connections through your external SSH client application. It can
48be the far-end file-transfer or client/server partner of your desktop
49Kermit client. It can also accept incoming dialed and network connections.
50It can even be installed as an Internet service on its own standard TCP
51socket, 1649 [RFC2839, RFC2840].
52.PP
53And perhaps most important, everything you can do "by hand" (interactively)
54with C-Kermit, can be "scripted" (automated) using its built-in
55cross-platform transport-independent script programming language, which
56happens to be identical to its interactive command language.
57.PP
58This manual page offers an overview of C-Kermit 8.0 for Unix ("Unix" is an
59operating system family that includes AIX, DG/UX, FreeBSD, HP-UX, IRIX,
60Linux, Mac OS X, NetBSD, OpenBSD, Open Server, Open Unix, QNX, Solaris,
61SunOS, System V R3, System V R4, Tru64 Unix, Unixware, Xenix, and many
62others). For thorough coverage, please consult the published C-Kermit
63manual and supplements (see DOCUMENTATION below). For further information
64about C-Kermit, Kermit software for other platforms, and Kermit manuals,
65visit the Kermit Project website:
66.PP
67  http://www.columbia.edu/kermit/
68.PP
69This is a longer-than-average manual page, and yet it barely scratches the
70surface. Don't be daunted. C-Kermit is a large and complex package,
71evolving over decades of practice and experience, but that doesn't mean
72it's hard to learn or use. Its most commonly used functions are explained
73here with pointers to additional information elsewhere.
74.SH SYNOPSIS
75.B kermit [
76.I filename
77.B ] [
78.I options
79.B ] [ {=,--,+}
80.I text
81.B ] ]
82.PP
83or:
84.PP
85.B kermit
86.I URL
87.PP
88If the first command-line argument is the name of a file, interactive-mode
89commands are executed from the file. The '=' (or "--") argument tells
90Kermit not to parse the remainder of the command line, but to make the
91words following '=' available as \e%1, \e%2, ... \e%9. The "+" argument is
92like "=" but for use in "kerbang scripts" (explained below). A second
93command-line format allows the one and only argument to be a Telnet, FTP,
94HTTP, or IKSD URL.
95.PP
96Order of execution:
97.TP
98 1.
99The command file (if any).
100.TP
101.nf
102 2.
103The initialization file, if any, unless suppressed with -Y.
104.fi
105.TP
106 3.
107The customization file (if it is executed by the initialization file).
108.TP
109 4.
110The command-line URL (if any, and if so, execution stops here).
111.TP
112 5.
113Command-line options (if any).
114.TP
115 6.
116Interactive commands.
117.PP
118Some command-line options can cause actions (such as -s to send a file);
119others just set parameters. If any action options are included on the
120command line, Kermit exits when finished unless also given the -S ("stay")
121option. If no action options are given, no initialization or command files
122contained an EXIT or QUIT command, and no fatal errors occurred, Kermit
123issues its prompt and waits for you to type commands.
124.IP
125Bear in mind that C-Kermit can be built with selected features
126disabled, and also that certain features are not available on all
127platforms. For example, C-Kermit can't be built with TCP/IP
128support on a platform that does not have TCP/IP header files and
129libraries (and even if Kermit does include TCP/IP support, it
130can't be used to make TCP/IP connections on a computer that does
131not have a TCP/IP stack installed). If your version of lacks
132C-Kermit a feature mentioned here, use its SHOW FEATURES command to
133see what might have been excluded.
134.PP
135C-Kermit has three kinds of commands: regular single-letter command-line
136options, extended-format command-line options, and interactive commands.
137.PP
138Like most Unix commands, C-Kermit can be be given options on the command
139line. But C-Kermit also can be used interactively by giving it commands
140composed of words, which are more intuitive than cryptic command-line
141options, and more flexible too. In other words, you don't have to use
142C-Kermit's command-line options, but they are available if you want to. (By
143the same token, you don't have to use its interactive commands either --
144you can use either or both in any combination.)
145.PP
146C-Kermit is generally installed in the PATH as "kermit", and therefore is
147invoked by typing the word "kermit" (lowercase) at the shell prompt, and
148then pressing the Return or Enter key. If you wish to include command-line
149options, put them after the word "kermit" but before pressing Return or
150Enter, separated by spaces, for example:
151.PP
152  $ kermit -s ckermit.tar.gz
153.PP
154('$' is the shell prompt; "kermit -s ckermit.tar.gz" is what you type,
155followed by Return or Enter.)
156.SH OPTIONS
157Here is a list of C-Kermit's single-letter command-line options, which
158start with a single dash (-), in ASCII ("alphabetical") order. Alphabetic
159case is significant (-A is not the same as -a).  Action options are
160tagged "ACTION".
161.TP
162-0
163(digit zero)  100% transparent Connect state for
164"in-the-middle" operation: 8 bits, no parity, no
165escape character, everything passes through.
166.TP
167-8
168(digit eight)  Connection is 8-bit clean (this is the
169default in C-Kermit 8.0). Equivalent to the EIGHTBIT
170command, which in turn is a shortcut for SET TERMINAL
171BYTESIZE 8, SET COMMAND BYTESIZE 8, SET PARITY NONE.
172.TP
173-9 arg
174(digit nine)  Make a connection to an FTP server.
175Equivalent to the FTP OPEN command.
176Argument: IP-address-or-hostname[:optional-TCP-port].
177NOTE: C-Kermit also has a separate FTP command-line
178personality, with regular FTP-like command-line
179syntax. More about this below.
180.TP
181-A
182Kermit is to be started as an Internet service (IKSD)
183(only from inetd.conf).
184.TP
185-B
186Kermit is running in Batch or Background (no
187controlling terminal). To be used in case Kermit
188doesn't automatically sense its background status.
189Equivalent to the SET BACKGROUND ON command.
190.TP
191-C arg
192Interactive-mode Commands to be executed.
193Argument: Commands separated by commas, list in
194doublequotes.
195.TP
196-D arg
197Delay before starting to send in Remote mode.
198Equivalent to the SET DELAY command.
199Argument: Number of seconds.
200.TP
201-E
202Exit automatically when connection closes. Equivalent
203to SET EXIT ON-DISCONNECT ON.
204.TP
205-F arg
206Use an open TCP connection.
207Argument: Numeric file descriptor of open TCP
208connection.
209Also see: -j, -J.
210.TP
211-G arg
212(ACTION) Get file(s) from server, send contents to standard
213output, which normally would be piped to another
214process.
215Argument: Remote file specification, in quotes if it
216contains metacharacters.
217Also see: -g, -k.
218.TP
219-H
220Suppress program startup Herald and greeting.
221.TP
222-I
223Tell Kermit it has a reliable connection, to force streaming to be used where
224it normally would not be.  Equivalent to the SET RELIABLE ON command.
225.TP
226-J arg
227(ACTION) "Be like Telnet." Like -j but implies -E.  Argument: IP
228hostname/address optionally followed by service.  NOTE: C-Kermit also has a
229separate Telnet command-line personality, with regular Telnet-like
230command-line syntax. More about this below.
231.TP
232-L
233Recursive directory descent for files in -s option.
234.TP
235-M arg
236My user name (for use with Telnet, Rlogin, FTP, etc).
237Equivalent to the SET LOGIN USER command.
238Argument: Username string.
239.TP
240-O
241(ACTION) (Uppercase letter O) Be a server for One command only.
242Also see: -x.
243.TP
244-P
245Don't convert file (Path) names of transferred files.
246Equivalent to SET FILE NAMES LITERAL.
247.TP
248-Q
249Quick Kermit protocol settings. Equivalent to the FAST
250command. This is the default in C-Kermit 7.0 and later.
251.TP
252-R
253Remote-only (this just makes IF REMOTE true).
254.TP
255-S
256Stay (enter command parser after action options).
257.TP
258-T
259Force Text mode for file transfer; implies -V.
260Equivalent to SET TRANSFER MODE MANUAL, SET FILE TYPE TEXT.
261.TP
262-V
263Disable automatic per-file text/binary switching.
264Equivalent to SET TRANSFER MODE MANUAL.
265.TP
266-Y
267Skip (don't execute) the initialization file.
268.TP
269-a arg
270As-name for file(s) in -s, -r, or -g.
271Argument: As-name string (alternative filename). When
272receiving files, this can be a directory name.
273.TP
274-b arg
275Speed for serial device. Equivalent to SET SPEED.
276Argument: Numeric Bits per second for serial
277connections.
278.TP
279-c
280(ACTION) Enter Connect state before transferring files.
281.TP
282-d
283Create a debug.log file with detailed debugging
284information (a second -d adds timestamps). Equivalent
285to LOG DEBUG but takes effect sooner.
286.TP
287-e arg
288Maximum length for incoming Kermit file-transfer
289packets. Equivalent to SET RECEIVE PACKET-LENGTH.
290Argument: Length in bytes.
291.TP
292-f
293(ACTION) Send a FINISH command to a Kermit server.
294.TP
295-g arg
296Get file(s) from a Kermit server.
297Argument: File specification on other computer, in
298quotes if it contains metacharacters. Equivalent to
299GET. Also see: -a, -G, -r.
300.TP
301-h
302(ACTION) Print Help text for single-letter command-line options
303(pipe thru 'more' to prevent scrolling).
304.TP
305-i
306Force binary (Image) mode for file transfer; implies
307-V. Equivalent to SET TRANSFER MODE MANUAL, SET FILE
308TYPE BINARY.
309.TP
310-j arg
311Make a TCP/IP connection.
312Argument: IP host name/address and optional service
313name or number. Equivalent to the TELNET command.
314Also see: -J, -F.
315.TP
316-k
317(ACTION) Receive file(s) to standard output, which normally
318would be piped to another process.
319Also see: -r, -G.
320.TP
321-l arg
322(Lowercase letter L) Make a connection on the given
323serial communications device. Equivalent to the SET
324LINE (SET PORT) command.
325Argument: Serial device name, e.g. /dev/ttyS0.
326.TP
327-m arg
328Modem type for use with the -l device. Equivalent to
329the SET MODEM TYPE command.
330Argument: Modem name as in SET MODEM TYPE command,
331e.g. "usrobotics".
332.TP
333-n
334(ACTION) Enter Connect state after transferring files (historical).
335.TP
336-p arg
337Parity. Equivalent to the SET PARITY command.
338Argument: One of the following: e(ven), o(dd), m(ark),
339n(one), s(pace).
340.TP
341-q
342Quiet (suppress most messages). Equivalent to SET QUIET ON.
343.TP
344-r
345(ACTION) Receive file(s). Equivalent to the RECEIVE command.
346Argument: (none, but see -a)
347.TP
348-s arg
349Send file(s).
350Argument: One or more local file specifications.
351Equivalent to the SEND command.
352Also see: -a.
353.TP
354-t
355(Historical) Xon (Ctrl-Q) Turnaround character for
356half-duplex connections (used on serial linemode
357connections to old mainframes). Equivalent to SET
358DUPLEX HALF, SET HANDSHAKE XON.
359.TP
360-v arg
361Window size for Kermit protocol (ignored when
362streaming). Equivalanet to SET WINDOW-SIZE.
363Argument: Number, 1 to 32.
364.TP
365-w
366Incoming files Write over existing files. Equivalent
367to SET FILE COLLISION OVERWRITE.
368.TP
369-x
370(ACTION) Enter server mode. Equivalent to the SERVER command.
371Also see: -O.
372.TP
373-y arg
374Alternative initialization file.
375Argument: Filename.
376.TP
377-z
378Force foreground behavior. To be used in case Kermit
379doesn't automatically sense its foreground status.
380Equivalent to the SET BACKGROUND OFF command.
381.PP
382Extended command-line options (necessary because single-letter ones are
383about used up) start with two dashes (--), with words rather than single
384letters as option names. If an extended option takes an argument, it is
385separated from the option word by a colon (:). Extended options include:
386
387.TP
388 --bannerfile:filename
389File to display upon startup or IKSD login.
390.TP
391 --cdfile:filename
392File to be sent for display to the client when
393server changes directory (filename is relative to
394the changed-to directory).
395.TP
396 --cdmessage:{on,off}
397Enable/disable the server CD message feature.
398.TP
399 --help
400Prints usage message for extended options.
401.TP
402 --helpfile:filename
403Designates a file containing custom text to
404replace the top-level HELP command.
405.TP
406 --nointerrupts
407Disables keyboard interrupts.
408.TP
409 --noperms
410Disables the Kermit protocol file Permissions
411attribute, to prevent transmission of file
412permissions (protection) from sender to receiver.
413.TP
414 --version
415(ACTION) C-Kermit prints its version number.
416.PP
417Plus several other IKSD-Only options described at:
418.PP
419  http://www.columbia.edu/kermit/iksd.html
420.PP
421See the file-transfer section for examples of command-line invocation.
422.SH COMMAND LANGUAGE
423C-Kermit's interactive command language is the subject of a 622-page book
424and another several hundred pages of updates, far too much for a manual
425page. But it's not hard to get started. At the shell prompt, just type
426"kermit" to get C-Kermit's interactive command prompt:
427.PP
428.nf
429  $ kermit
430  (/current/directory) C-Kermit>
431.fi
432.PP
433Begin by typing "help" (and then press the Return or Enter key) for a
434top-level overview, read it, and go from there. Your second command should
435probably be "intro" (introduction). Note the prompt shows your current
436directory (unless you tell Kermit to prompt you with something else).
437.PP
438Interactive commands are composed mainly of regular English words, usually
439in the form of imperative sentences, such as:
440.PP
441  send oofa.txt
442.PP
443which tells Kermit to send (transfer) the file whose name is oofa.txt, or:
444.PP
445  set transfer mode automatic
446.PP
447which sets Kermit's "transfer mode" to "automatic" (whatever that means).
448.PP
449While typing commands, you can abbreviate, ask for help (by pressing the
450"?" key anywhere in a command), complete keywords or filenames (with the
451Tab or Esc key), and edit your typing with Backspace or Delete, Ctrl-W,
452Ctrl-U, etc. You can also recall previous commands, save your command
453history, and who knows what else. Give the INTRO command for details.
454.PP
455C-Kermit has hundreds of commands, and they can be issued in infinite
456variety and combinations, including commands for:
457.nf
458.PP
459\(bu    Making connections (SET LINE, DIAL, TELNET, SSH, FTP, ...)
460.br
461\(bu    Breaking connections (HANGUP, CLOSE)
462.br
463\(bu    Transferring files (SEND, GET, RECEIVE, MOVE, RESEND, ...)
464.br
465\(bu    Establishing preferences (SET)
466.br
467\(bu    Displaying preferences (SHOW)
468.br
469\(bu    Managing local files (CD, DELETE, MKDIR, DIR, RENAME, TYPE, ...)
470.br
471\(bu    Managing remote files (RCD, RDEL, RMKDIR, RDIR, ...)
472.br
473\(bu    Using local files (FOPEN, FCLOSE, FREAD, FWRITE)
474.br
475\(bu    Programming (TAKE, DEFINE, IF, FOR, WHILE, SWITCH, DECLARE, ...)
476.br
477\(bu    Interacting with the user (ECHO, ASK, ...)
478.br
479\(bu    Interacting with a remote computer (INPUT, OUTPUT, ...)
480.br
481\(bu    Interacting with local programs (RUN, EXEC, PTY, ...)
482.br
483\(bu    Logging things (LOG SESSION, LOG PACKETS, LOG DEBUG, ...)
484.PP
485.fi
486And of course QUIT or EXIT to get out and HELP to get help, and for
487programmers: loops, decision making, variables, arrays, associative arrays,
488integer and floating point arithmetic, macros, built-in and user-defined
489functions, string manipulation, pattern matching, block structure, scoping,
490recursion, and all the rest. To get a list of all C-Kermit's commands, type
491a question mark (?) at the prompt. To get a description of any command,
492type HELP followed by the name of the command, for example:
493.PP
494  help send
495.PP
496The command interruption character is Ctrl-C (hold down the Ctrl key and
497press the C key).
498.PP
499The command language "escape character", used to introduce variable names,
500function invocations, and so on, is backslash (\). If you need to include a
501literal backslash in a command, type two of them, e.g.:
502.PP
503  get c:\ek95\ek95custom.ini
504.SS Command Files, Macros, and Scripts
505A file containing Kermit commands is called a Kermit command file or Kermit
506script. It can be executed with Kermit's TAKE command:
507.PP
508  (/current/dir) C-Kermit> take commandfile
509.PP
510(where "commandfile" is the name of the command file). Please don't pipe a
511command file into Kermit's standard input (which might or might not work);
512if you have Kermit commands in a file, tell Kermit to TAKE the file.
513.PP
514In Unix only, a Kermit command file can also be executed directly by
515including a "kerbang" line as the first line of the file:
516.PP
517  #!/usr/local/bin/kermit +
518.PP
519That is, a top line that starts with "#!", followed immediately by the full
520path of the Kermit executable, and then, if the Kermit script is to be
521given arguments on the command line, a space and a plus sign. The script
522file must also have execute permission:
523.PP
524  chmod +x commandfile
525.PP
526Except for the " +" part, this is exactly the same as you would do for a
527shell script, a Perl script, etc. Here's a simple but useless example
528script that regurgitates its arguments (up to three of them):
529.PP
530  #!/usr/local/bin/kermit +
531  if defined \e%1 echo "Argument 1: \e%1"
532  if defined \e%2 echo "Argument 2: \e%2"
533  if defined \e%3 echo "Argument 3: \e%3"
534  if defined \e%4 echo "etc..."
535  exit
536.PP
537If this file is stored in your current directory as "commandfile", then:
538.PP
539  ./commandfile one two three four five
540.PP
541prints:
542.PP
543  Argument 1: one
544  Argument 2: two
545  Argument 3: three
546  etc...
547.PP
548This illustrates the basic structure of a standalone Kermit script: the
549"kerbang line", then some commands. It should end with "exit" unless you
550want the Kermit prompt to appear when it is finished. \e%1 is the first
551argument, \e%2 the second, and so on.
552.PP
553You can also create your own commands by defining named macros composed of
554other Kermit commands (or macros). For example:
555.PP
556.nf
557  define mydelete {
558      local trash
559      assign trash \ev(home)trashcan/
560      if not defined \e%1 end 1 "Delete what?"
561      if wild \e%1 {
562          end 1 "Deleting multiple files is too scary"
563      }
564      if not exist \e%1 end 1 "I can't find \e%1"
565      if not directory \em(trash) {
566          mkdir \em(trash)
567          if fail end 1 "No trash can"
568      }
569      rename /list \e%1 \em(trash)
570  }
571  define myundelete {
572      local trash
573      assign trash \ev(home)trashcan/
574      if not defined \e%1 end 1 "Undelete what?"
575      if wild \e%1 {
576          end 1 "Undeleting multiple files is too hard"
577      }
578      if not directory \em(trash) end 1 "No trash can"
579      if not exist \em(trash)\e%1 {
580          end 1 "I can't find \e%1 in trash can"
581      }
582      rename /list \em(trash)\e%1 .
583  }
584.PP
585.fi
586These sample macros are not exactly production quality (they don't handle
587filenames that include path segments, they don't handle multiple files,
588etc), but you get the idea: you can pass arguments to macros, and they can
589check them and make other kinds of decisions. If you put the above lines
590into your initialization or customization file (explained below), you'll
591have MYDELETE and MYUNDELETE commands available every time you start
592Kermit, at least as long as you don't suppress execution of the
593initialization file. (Exercise for the reader: Make these macros generally
594useful: remove limitations, add trashcan display, browsing, emptying, etc.)
595.PP
596Kerbang scripts execute without the initialization file. This to keep them
597portable and also to make them start faster. If you want to write Kerbang
598scripts that depend on the initialization file, include the command
599.PP
600  take \ev(home).kermrc
601.PP
602at the desired spot in the script. By the way, \ev(xxx) is a built-in
603variable (xxx is the variable name, "home" in this case). To see what
604built-in variables are available, type "show variables" at the C-Kermit
605prompt. To see what else you can show, type "show ?". \em(xxx) is a user
606defined variable (strictly speaking, it is a macro used as a variable).
607.SS Command List
608C-Kermit has more than 200 top-level commands, and some of these, such as
609SET, branch off into hundreds of subcommands of their own, so it's not
610practical to describe them all here. Instead, here's a concise list of the
611most commonly used top-level commands, grouped by category. To learn about
612each command, type "help" followed by the command name, e.g. "help set".
613Terms such as Command state and Connect state are explained in subsequent
614sections.
615.PP
616Optional fields are shown in [ brackets ].  "filename" means the
617name of a single file. filespec means a file specification that is allowed
618to contain wildcard characters like '*' to match groups of files. options
619are (optional) switches like /PAGE, /NOPAGE, /QUIET, etc, listed in the
620HELP text for each command. Example:
621.PP
622.nf
623  send /recursive /larger:10000 /after:-1week /except:*.txt *
624.fi
625.PP
626which can be read as "send all the files in this directory and all the ones
627underneath it that are larger than 10000 bytes, no more than one week old,
628and whose names don't end with ".txt".
629.SS
630Basic Commands
631.RS
632.TP
633HELP
634Requests top-level help.
635.TP
636HELP command
637Requests help about the given command.
638.TP
639INTRODUCTION
640Requests a brief introduction to C-Kermit.
641.TP
642LICENSE
643Displays the C-Kermit software copyright and license.
644.TP
645VERSION
646Displays C-Kermit's version number.
647.TP
648EXIT [ number ]
649Exits from Kermit with the given
650status code. Synonyms: QUIT, E, Q.
651.TP
652TAKE filename [ parameters... ]
653Executes commands from the given
654.TP
655LOG item [ filename ]
656Keeps a log of the given item in the given file.
657.TP
658[ DO ] macro [ parameters... ]
659Executes commands from the given macro.
660.TP
661SET parameter value
662Sets the given parameter to the given value.
663.TP
664SHOW category
665Shows settings in a given category.
666.TP
667STATUS
668Tells whether previous command succeeded or failed.
669.TP
670DATE [ date-and/or-time ]
671Shows current date-time or interprets given date-time.
672.TP
673RUN [ extern-command [ parameters... ]                 
674Runs the given external command. Synonym: !.
675.TP
676EXEC [ extern-command [ params... ]
677Kermit overlays itself with the given command.
678.TP
679SUSPEND
680Stops Kermit and puts it in the background. Synonym: Z.
681.RE
682.SS
683Local File Management
684.RS
685.TP
686TYPE [ options ] filename
687Displays the contents of the given file.
688.TP
689MORE [ options ] filename     
690Equivalent to TYPE /PAGE (pause after each screenful).
691.TP
692CAT [ options ] filename     
693Equivalent to TYPE /NOPAGE.
694.TP
695HEAD [ options ] filename     
696Displays the first few lines of a given file.
697.TP
698TAIL [ options ] filename     
699Displays the last few lines of a given file.
700.TP
701GREP [ options ] pattern filespec
702Displays lines from files that match
703the pattern. Synonym: FIND.
704.TP
705DIRECTORY [ options ] [filespec ]
706Lists files (built-in, many options).
707.TP
708LS [ options ] [ filespec ]   
709Lists files (runs external "ls" command).
710.TP
711DELETE [ options ] [ filespec ]
712Deletes files. Synonym: RM.
713.TP
714PURGE [ options ] [ filespec ]
715Removes backup (*.~n~) files.
716.TP
717COPY [ options ] [ filespecs... ]
718Copies files. Synonym: CP.
719.TP
720RENAME [ options ] [ filespecs... ]
721Renames files. Synonym: MV.
722.TP
723CHMOD [ options ] [ filespecs... ]
724Changes permissions of files.
725.TP
726TRANSLATE filename charsets [ filename ]
727Converts file's character set. Synonym: XLATE.
728.TP
729CD
730Changes your working directory to your home directory.
731.TP
732CD directory
733Changes your working directory to the one given.
734.TP
735CDUP
736Changes your working directory one level up.
737.TP
738PWD
739Displays your working directory.
740.TP
741BACK
742Returns to your previous working directory.
743.TP
744MKDIR [ directory ]
745Creates a directory.
746.TP
747RMDIR [ directory ]
748Removes a directory.
749.RE
750.SS
751Making Connections
752.RS
753.TP
754SET LINE [ options ] devicename                     
755Opens the named serial port. Synonym: SET PORT.
756.TP
757OPEN LINE [ options ] devicename
758Same as SET LINE. Synonym: OPEN PORT.
759.TP
760SET MODEM TYPE [ name ]
761Tells Kermit what kind of modem is on the port.
762.TP
763DIAL [ number ]
764Tells Kermit to dial the given phone number with the modem.
765.TP
766REDIAL
767Redials the most recently dialed phone number.
768.TP
769ANSWER
770Waits for and answers an incoming call on the modem.
771.TP
772AUTHENTICATE [ parameters... ]
773Performs secure authentication on a TCP/IP connection.
774.TP
775SET NETWORK TYPE { TCP/IP, X.25, ... }
776Selects network type for subsequent SET HOST commands.
777.TP
778SET HOST [ options ] host [ port ]                         
779Opens a network connection to the given host and port.
780.TP
781SET HOST * port
782Waits for an incoming TCP/IP connection on the given port.
783.TP
784TELNET [ options ] host
785Opens a Telnet connection to the host and enters Connect state.
786.TP
787RLOGIN [ options ] host
788Opens an Rlogin connection to the host and enters Connect state.
789.TP
790IKSD [ options ] host
791Opens a connection to an Internet Kermit Service.
792.TP
793SSH [ options ] host
794Opens an SSH connection to the host and enters Connect state.
795.TP
796FTP OPEN host [ options ]
797Opens an FTP connection to the host.
798.TP
799HTTP [ options ] OPEN host
800Opens an HTTP connection to the host.
801.TP
802PTY external-command
803Runs the command on a pseudoterminal as if it were a connection.
804.TP
805PIPE external-command
806Runs the command through a pipe as if it were a connection.
807.RE
808.SS
809Using Connections
810.RS
811.TP
812CONNECT [ options ]
813Enters Connect (terminal) state.  Synonym: C.
814.TP
815REDIRECT command
816Redirects the given external command over the connection.
817.TP
818TELOPT command
819Sends a Telnet protocol command (Telnet connections only).
820.TP
821Ctrl-\eC
822"Escapes back" from Connect state to Command state.
823.TP
824Ctrl-\eB
825(In Connect state) Sends a BREAK signal (serial or Telnet).
826.TP
827Ctrl-\e!
828(In Connect state) Enters inferior shell; "exit" to return.
829.TP
830Ctrl-\e?
831(In Connect state) Shows a menu of other escape-level options.
832.TP
833Ctrl-\eCtrl-\e
834(In Connect state) Type two
835Ctrl-Backslashes to send one of them.
836.TP
837SET ESCAPE [ character ]
838Changes Kermit's Connect-state escape character.
839.RE
840.SS
841Closing Connections
842.RS
843.TP
844HANGUP
845Hangs up the currently open
846serial-port or network connection.
847.TP
848CLOSE
849Closes the currently open
850serial-port or network connection.
851.TP
852SET LINE (with no devicename)
853Closes the currently open
854serial-port or network connection.
855.TP
856SET HOST (with no hostname)
857Closes the currently open serial-port or network connection.
858.TP
859FTP CLOSE
860Closes the currently open FTP connection.
861.TP
862HTTP CLOSE
863Closes the currently open HTTP connection.
864.TP
865EXIT
866Also closes all connections. Synonym: QUIT.
867.TP
868SET EXIT WARNING OFF
869Suppresses warning about open connections on exit or close.
870.RE
871.SS
872File Transfer
873.RS
874.TP
875SEND [ options ] filename [ as-name ]
876Sends the given file. Synonym: S.
877.TP
878SEND [ options ] filespec
879Sends all files that match.
880.TP
881RESEND [ options ] filespec
882Resumes an interupted SEND from the point of failure.
883.TP
884RECEIVE [ options ] [ as-name ]                   
885Waits passively for files to arrive. Synonym: R.
886.TP
887LOG TRANSACTIONS [ filename ]
888Keeps a record of file transfers.
889.TP
890FAST
891Use fast file-transfer settings (default).
892.TP
893CAUTIOUS
894Use cautious and less fast file-transfer settings.
895.TP
896ROBUST
897Use ultra-conservative and slow file-transfer settings.
898.TP
899STATISTICS [ options ]
900Gives statistics about the most recent file transfer.
901.TP
902WHERE
903After transfer: "Where did my files go?".
904.TP
905TRANSMIT [ options ] [ofilename ]
906Sends file without protocol. Synonym: XMIT.
907.TP
908LOG SESSION [ filename ]
909Captures remote text or files without protocol.
910.TP
911SET PROTOCOL [ name... ]
912Tells Kermit to use an external file-transfer protocol.
913.TP
914FTP { PUT, MPUT, GET, MGET, ... }
915FTP client commands.
916.TP
917HTTP { PUT, GET, HEAD, POST, ... }
918HTTP client commands.
919.RE
920.SS
921Kermit Server
922.RS
923.TP
924ENABLE, DISABLE
925Controls which server features can be used by clients.
926.TP
927SET SERVER
928Sets parameters prior to entering Server state.
929.TP
930SERVER
931Enters Server state.
932.RE
933.SS
934Client of Kermit or FTP Server
935.RS
936.TP
937[ REMOTE ] LOGIN [ user password ]         
938Logs in to a Kermit server or IKSD that requires it.
939.TP
940[ REMOTE ] LOGOUT
941Logs out from a Kermit server or IKSD.
942.TP
943SEND [ options ] filename [ as-name ]                   
944Sends the given file to the server. Synonyms: S, PUT.
945.TP
946SEND [ options ] filespec
947Sends all files that match.
948.TP
949RESEND [ options ] filespec
950Resumes an interupted SEND from the point of failure.
951.TP
952GET [ options ] remote-filespec
953Asks the server to send the given files. Synonym: G.
954.TP
955REGET [ options ] remote-filespec
956Resumes an interrupted GET from the point of failure.
957.TP
958REMOTE CD [ directory ]
959Asks server to change its working
960directory. Synonym: RCD.
961.TP
962REMOTE PWD [ directory ]
963Asks server to display its working directory. Synonym: RPWD.
964.TP
965REMOTE DIRECTORY [ filespec... ]
966Asks server to send a directory listing. Synonym: RDIR.
967.TP
968REMOTE DELETE [ filespec... ]
969Asks server to delete files. Synonym: RDEL.
970.TP
971REMOTE [ command... ]
972(Many other commands: "remote ?" for a list).
973.TP
974MAIL [ options ] filespec
975Sends file(s) to be delivered as e-mail (Kermit only).
976.TP
977FINISH
978Asks the server to exit server state (Kermit only).
979.TP
980BYE
981Asks the server to log out and close the connection.
982.RE
983.SS
984Script Programming
985.PP
986.RS
987DEFINE, DECLARE, UNDEFINE, UNDECLARE, ASSIGN, EVALUATE, SEXPRESSION,
988ARRAY, SORT, INPUT, OUTPUT, IF, FOR, WHILE, SWITCH, GOTO, ECHO, ASK,
989GETC, GETOK, ASSERT, WAIT, SLEEP, FOPEN, FREAD, FWRITE, FCLOSE, STOP,
990END, RETURN, LEARN, SHIFT, TRACE, VOID, INCREMENT, DECREMENT, ... For
991these and many more you'll need to consult the manual and supplements,
992and/or visit the Kermit Script Library, which also includes a brief
993tutorial. Hint: HELP LEARN to find out how to get Kermit to write
994simple scripts for you.
995.RE
996.PP
997Many of Kermit's commands have synonyms, variants, relatives, and so on.
998For example, MSEND is a version of SEND that accepts a list of file
999specifications to be sent, rather than just one file specification, and
1000MPUT is a synonym of MSEND. MOVE means to SEND and then DELETE the source
1001file if successful. MMOVE is like MOVE, but accepts a list of filespecs,
1002and so on. These are described in the full documentation.
1003.PP
1004Use question mark to feel your way through an unfamiliar command, as in
1005this example:
1006.PP
1007.nf
1008  C-Kermit> remote ? One of the following:
1009   assign     directory  kermit     print      rmdir
1010   cd         exit       login      pwd        set
1011   copy       help       logout     query      space
1012   delete     host       mkdir      rename     type
1013  C-Kermit> remote set ? One of the following:
1014   attributes   file         retry        transfer
1015   block-check  receive      server       window
1016  C-Kermit> remote set file ? One of the following:
1017   character-set  incomplete     record-length
1018   collision      names          type
1019  C-Kermit> remote set file names ? One of the following:
1020   converted  literal
1021  C-Kermit> remote set file names literal
1022  C-Kermit>
1023.PP
1024.fi
1025This is called menu on demand: you get a menu when you want one, but menus
1026are not forced on you even when know what you're doing. Note that you can
1027also abbreviate most keywords, and you can complete them with the Tab or
1028Esc key. Also note that ? works for filenames too, and that you can use it
1029in the middle of a keyword or filename, not just at the beginning. For
1030example, "send x?" lists all the files in the current directory whose names
1031start with 'x'.
1032.SH INITIALIZATION FILE
1033In its default configuration, C-Kermit executes commands from a file
1034called .kermrc in your home directory when it starts, unless it is given the
1035-Y or -y command-line option. Custom configurations might substitute a shared
1036system-wide initialization file. The SHOW FILE command tells what
1037initialization file, if any, was used. The standard initialization file
1038"chains" to an individual customization file, .mykermc, in the home directory,
1039in which each user can establish her/his own preferences, define macros, and
1040so on.
1041.PP
1042Since execution of the initialization file (at least the standard one)
1043makes C-Kermit take longer to start, it might be better not to have an
1044initialization file, especially now that Kermit's default startup
1045configuration is well attuned to modern computing and networking -- in
1046other words, you no longer have do anything special to make Kermit
1047transfers go fast. So instead of having an initialization file that is
1048executed every time Kermit starts, you might consider making one or more
1049kerbang scripts (with names other that .kermrc) that do NOT include an
1050"exit" command, and invoke those when you need the settings, macro
1051definitions, and/or scripted actions they contain, and invoke C-Kermit
1052directly when you don't.
1053.PP
1054To put it another way... We still distribute the standard initialization
1055file since it's featured in the manual and backwards compatibility is
1056important to us. But there's no harm in not using it if you don't need the
1057stuff that's in it (services directory, dialing directory, network
1058directory, and associated macro definitions). On the other hand, if there
1059are settings or macros you want in effect EVERY time you use Kermit, the
1060initialization file (or the customization file it chains to) is the place
1061to put them, because that's the only place Kermit looks for them
1062automatically each time you start it.
1063.SH MODES OF OPERATION
1064Kermit is said to be in Local mode if it has made a connection to another
1065computer, e.g. by dialing it or establishing a Telnet connection to it. The
1066other computer is remote, so if you start another copy of Kermit on the
1067remote computer, it is said to be in Remote mode (as long as it has not
1068made any connections of its own). The local Kermit communicates over the
1069communications device or network connection, acting as a conduit between
1070the the remote computer and your keyboard and screen. The remote Kermit is
1071the file-transfer partner to the local Kermit and communicates only through
1072its standard input and output.
1073.PP
1074At any moment, a Kermit program can be in any of the following states. It's
1075important to know what they are and how to change from one to the other.
1076.TP
1077Command state
1078In this state, Kermit reads commands from:
1079.sp
1080\(bu    Your keyboard; or:
1081.br
1082\(bu    A file, or:
1083.br
1084\(bu    A macro definition.
1085.sp
1086You can exit from Command state back to Unix with the EXIT or QUIT
1087command (same thing). You can enter Connect state with any of various
1088commands (CONNECT, DIAL, TELNET, etc). You can enter file transfer
1089state with commands like SEND, RECEIVE, and GET. You can enter Server
1090state with the SERVER command. The TAKE command tells Kermit to read
1091and execute commands from a file. The (perhaps implied) DO command
1092tells Kermit to read and execute commands from a macro definition.
1093While in Command state, you can interrupt any command, macro, or
1094command file by typing Ctrl-C (hold down the Ctrl key and press the C
1095key); this normally brings you back to the prompt.
1096.TP
1097Shell state
1098You can invoke an inferior shell or external command from the Kermit
1099command prompt by using the PUSH, RUN (!), EDIT, or BROWSE command.
1100While the inferior shell or command is active, Kermit is suspended and
1101does nothing. Return to Kermit Command state by exiting from the
1102inferior shell or application.
1103.TP
1104Connect state
1105In this state, which can be entered only when in Local mode (i.e. when
1106Kermit has made a connection to another computer), Kermit is acting as
1107a terminal to the remote computer. Your keystrokes are sent to the
1108remote computer and characters that arrive over the communication
1109connection are displayed on your screen. This state is entered when
1110you give a CONNECT, DIAL, TELNET, RLOGIN, or IKSD command. You can
1111return to command state by logging out of the remote computer, or by
1112typing:
1113.sp
1114  Ctrl-\ec
1115.sp
1116That is: Hold down the Ctrl key and press the backslash key, then let
1117go of the Ctrl key and press the C key. This is called escaping back.
1118Certain other escape-level commands are also provided; type Ctrl-\e?
1119for a list. For example, you can enter Shell state with:
1120.sp
1121  Ctrl-\e!
1122.sp
1123To send a Ctrl-\e to the host while in Connect state, type two of them
1124in a row. See HELP CONNECT and HELP SET ESCAPE for more info.
1125.TP
1126Local file-transfer state
1127In this state, Kermit is sending packets back and forth with the other
1128computer in order to transfer a file or accomplish some other
1129file-related task. And at the same time, it is displaying its progress
1130on your screen and watching your keyboard for interruptions. In this
1131state, the following single-keystroke commands are accepted:
1132.sp
1133.RS
1134.TP
1135X
1136Interrupt the current file and go on to the next (if any).
1137.TP
1138Z
1139Interrupt the current file and skip all the rest.
1140.TP
1141E
1142Like Z but uses a "stronger" protocol (use if X or Z don't work).
1143.TP
1144Ctrl-C
1145Interrupt file-transfer mode (use if Z or E don't work).
1146.sp
1147.RE
1148Kermit returns to its previous state (Command or Connect) when the
1149transfer is complete or when interrupted successfully by X, Z, E, or
1150Ctrl-C (hold down the Ctrl key and press the C key).
1151.TP
1152Remote file-transfer state
1153In this state, Kermit is exchanging file-transfer packets with its
1154local partner over its standard i/o. It leaves this state
1155automatically when the transfer is complete. In case you find your
1156local Kermit in Connect state and the remote one in File-transfer
1157state (in which it seems to ignore your keystrokes), you can usually
1158return it to command state by typing three Ctrl-C's in a row. If that
1159doesn't work, return your local Kermit to Command state (Ctrl-\e C) and
1160type "e-packet" and then press the Return or Enter key; this forces a
1161fatal Kermit protocol error.
1162.TP
1163Remote Server state
1164This is like Remote File-transfer state, except it never returns
1165automatically to Command state. Rather, it awaits further instructions
1166from the client program; that is, from your Local Kermit program. You
1167can return the Remote Server to its previous state by issuing a
1168"finish" command to the client, or if you are in Connect state, by
1169typing three Ctrl-C's in a row. You can tell the server job to log out
1170and break the connection by issuing a "bye" command to the client.
1171.TP
1172Local Server state
1173Like Remote-Server state, but in local mode, and therefore with its
1174file-transfer display showing, and listening for single-key commands,
1175as in Local File-transfer state. Usually this state is entered
1176automatically when a remote Kermit program gives a GET command.
1177.sp
1178C-Kermit, Kermit 95, and MS-DOS Kermit all can switch automatically from
1179Connect state to Local File-transfer state when you initiate a file
1180transfer from the remote computer by starting Kermit and telling it to send
1181or get a file, in which case, Connect state is automatically resumed after
1182the file transfer is finished.
1183.sp
1184Note that C-Kermit is not a terminal emulator. It is a communications
1185application that you run in a terminal window (e.g. console or Xterm). The
1186specific emulation, such as VT100, VT220, Linux Console, or Xterm, is
1187provided by the terminal window in which you are running C-Kermit. Kermit
118895 and MS-DOS Kermit, on the other hand, are true terminal emulators. Why
1189is C-Kermit not a terminal emulator? CLICK HERE to read about it.
1190.SH MAKING CONNECTIONS
1191Here is how to make different kinds of connections using interactive Kermit
1192commands (as noted above, you can also make connections with command-line
1193options). Note that you don't have to make connections with Kermit. It can
1194also be used on the far end of a connection as the remote file transfer and
1195management partner of your local communications software.
1196.TP
1197Making a Telnet Connection
1198At the C-Kermit command prompt, simply type:
1199.sp
1200.nf
1201  telnet foo.bar.com
1202.fi
1203.sp
1204(substituting desired hostname or address). 
1205You can also include a port number:
1206.sp
1207.nf
1208  telnet xyzcorp.com 3000 ;
1209.fi
1210.sp
1211If the connection is successful, Kermit automically enters Connect
1212state. When you logout from the remote host, Kermit automatically
1213returns to its prompt. More info: HELP TELNET, HELP SET TELNET, HELP
1214SET TELOPT. Also see the IKSD section below.
1215.TP
1216Making an Rlogin connection
1217This is just like Telnet, except you have to be root to do it because
1218Rlogin uses a privileged TCP port:
1219.sp
1220.nf
1221  rlogin foo.bar.com
1222.fi
1223.sp
1224More info: HELP RLOGIN.
1225.TP
1226Making an SSH Connection
1227Unlike Telnet and Rlogin, SSH connections are not built-in, but
1228handled by running your external SSH client through a pseudoterminal.
1229Using C-Kermit to control the SSH client gives you all of Kermit's
1230features (file transfer, character-set conversion, scripting, etc)
1231over SSH.
1232.sp
1233  ssh foo.bar.com
1234.sp
1235More info: HELP SSH, HELP SET SSH.
1236.TP
1237Dialing with a Modem
1238If it's an external modem, make sure it is connected to a usable
1239serial port on your computer with a regular (straight-through) modem
1240cable, and to the telephone jack with a telephone cable, and that it's
1241turned on. Then use these commands:
1242.sp
1243.nf
1244  set modem type usrobotics  ; Or other supported type
1245  set line /dev/ttyS0        ; Specify device name
1246  set speed 57600            ; Or other desired speed
1247  set flow rts/cts           ; Most modern modems support this
1248  set dial method tone       ; (or pulse)
1249  dial 7654321               ; Dial the desired number
1250.fi
1251.sp
1252Type "set modem type ?" for a list of supported modem types. If you
1253omit the SET MODEM TYPE command, the default type is
1254"generic-high-speed", which should work for most modern AT-command-set
1255modems. If the line is busy, Kermit redials automatically. If the call
1256does not succeed, use "set dial display on" and try it again to watch
1257what happens. If the call succeeds, Kermit enters Connect state
1258automatically and returns to its prompt automatically when you log out
1259from the remote computer or the connection is otherwise lost.
1260.sp
1261You can also dial from a modem that is accessible by Telnet, e.g. to a
1262reverse terminal server. In this case the command sequence is:
1263.sp
1264.nf
1265  set host ts.xxx.com 2000   ; Terminal-server and port
1266  set modem type usrobotics  ; Or other supported type
1267  set dial method tone       ; (or pulse)
1268  dial 7654321               ; Dial the desired number
1269.fi
1270.sp
1271If the terminal server supports the Telnet Com Port Option, RFC 2217,
1272you can also give serial-port related commands such as SET SPEED, SET
1273PARITY, and so on, and Kermit relays them to the terminal server using
1274the protocol specified in the RFC.
1275.sp
1276More info: HELP SET MODEM, HELP SET LINE, HELP SET SPEED, HELP SET
1277FLOW, HELP DIAL, HELP SET DIAL, HELP SET MODEM, HELP SET
1278CARRIER-WATCH, SHOW COMMUNICATIONS, SHOW MODEM, SHOW DIAL.
1279.TP
1280Direct Serial Port
1281Connect the two computers, A and B, with a null modem cable (or two
1282modem cables interconnected with a null-modem adapter or modem
1283eliminator). From Computer A:
1284.sp
1285.nf
1286  set modem type none   ; There is no modem
1287  set line /dev/ttyS0   ; Specify device name
1288  set carrier-watch off ; If DTR CD are not cross-connected
1289  set speed 57600       ; Or other desired speed
1290  set flow rts/cts      ; If RTS and CTS are cross-connected
1291  set parity even       ; (or "mark" or "space", if necessary)
1292  set stop-bits 2       ; (rarely necessary)
1293  set flow xon/xoff     ; If you can't use RTS/CTS
1294  connect               ; Enter Connect (terminal) state
1295.fi
1296.sp
1297This assumes Computer B is set up to let you log in. If it isn't, you
1298can run a copy of Kermit on Computer B and follow approximately the
1299same directions. More info: As above plus HELP CONNECT.
1300.PP
1301With modems or direct serial connections, you might also have to "set
1302parity even" (or "mark" or "space") if it's a 7-bit connection.
1303.PP
1304Of the connection types listed above, only one can be open at a time.
1305However, any one of these can be open concurrently with an FTP or HTTP
1306session. Each connection type can be customized to any desired degree,
1307scripted, logged, you name it. See the manual.
1308.PP
1309NOTE: On selected platforms, C-Kermit also can make X.25 connections. See
1310the manual for details.
1311.SH TRANSFERRING FILES WITH KERMIT
1312There is a widespread and persistent belief that Kermit is a slow protocol.
1313This is because, until recently, it used conservative tuning by default to
1314make sure file transfers succeeded, rather than failing because they
1315overloaded the connection. Some extra commands (or command-line options,
1316like -Q) were needed to make it go fast, but nobody bothered to find out
1317about them. Also, it takes two to tango: most non-Kermit-Project Kermit
1318protocol implementations really ARE slow. The best file-transfer partners
1319for C-Kermit are: another copy of C-Kermit (7.0 or later) and Kermit 95.
1320These combinations work well and they work fast by default. MS-DOS Kermit
1321is good too, but you have to tell it to go fast (by giving it the FAST
1322command).
1323.PP
1324Furthermore, all three of these Kermit programs support "autodownload" and
1325"autoupload", meaning that when they are in Connect state and a Kermit
1326packet comes in from the remote, they automatically switch into file
1327transfer mode.
1328.PP
1329And plus, C-Kermit and K95 also switch automatically between text and
1330binary mode for each file, so there is no need to "set file type binary" or
1331"set file type text", or to worry about files being corrupted because they
1332were transferred in the wrong mode.
1333.PP
1334What all of these words add up to is that now, when you use up-to-date
1335Kermit software from the Kermit Project, file transfer is not only fast,
1336it's ridiculously easy. You barely have to give any commands at all.
1337.TP
1338Downloading Files
1339Let's say you have Kermit 95, C-Kermit, or MS-DOS Kermit on your
1340desktop computer, with a connection to a Unix computer that has
1341C-Kermit installed as "kermit". To download a file (send it from Unix
1342to your desktop computer), just type the following command at your
1343Unix shell prompt:
1344.sp
1345  kermit -s oofa.txt
1346.sp
1347(where oofa.txt is the filename). If you want to send more than one
1348file, you can put as many filenames as you want on the command line,
1349and they can be any combination of text and binary:
1350.sp
1351  kermit -s oofa.txt oofa.zip oofa.html oofa.tar.gz
1352.sp
1353and/or you can use wildcards to send groups of files:
1354.sp
1355  kermit -s oofa.*
1356.sp
1357If you want to send a file under an assumed name, use:
1358.sp
1359  kermit -s friday.txt -a today.txt
1360.sp
1361This sends the file friday.txt but tells the receiving Kermit that its
1362name is today.txt. In all cases, as noted, when the file transfer is
1363finished, your desktop Kermit returns automatically to Connect state.
1364No worries about escaping back, re-connecting, text/binary mode
1365switching. Almost too easy, right?
1366.TP
1367Uploading Files
1368To upload files (send them from your desktop computer to the remote
1369Unix computer) do the same thing, but use the -g (GET) option instead
1370of -s:
1371.sp
1372  kermit -g oofa.txt
1373.sp
1374This causes your local Kermit to enter server mode; then the remote
1375Kermit program requests the named file and the local Kermit sends it
1376and returns automatically to Connect state when done.
1377.sp
1378If you want to upload multiple files, you have have use shell quoting
1379rules, since these aren't local files:
1380.sp
1381.nf
1382  kermit -g "oofa.txt oofa.zip oofa.html oofa.tar.gz"
1383  kermit -g "oofa.*"
1384.fi
1385.sp
1386If you want to upload a file but store it under a different name, use:
1387.sp
1388  kermit -g friday.txt -a today.txt
1389.TP
1390Kermit Transfers the Old-Fashioned Way
1391If your desktop communications software does not support autoupload or
1392autodownload, or it does not include Kermit server mode, the procedure
1393requires more steps.
1394.sp
1395To download a file, type:
1396.sp
1397  kermit -s filename
1398.sp
1399on the host as before, but if nothing happens automatically in
1400response to this command, you have to switch your desktop
1401communications software into Kermit Receive state. This might be done
1402by escaping back using keyboard characters or hot keys (Alt-x is
1403typical) and/or with a command (like RECEIVE) or a menu. When the file
1404transfer is complete, you have to go back to Connect state, Terminal
1405emulation, or whatever terminology applies to your desktop
1406communications software.
1407.sp
1408To upload a file, type:
1409.sp
1410  kermit -r
1411.sp
1412on the host (rather than "kermit -g"). This tells C-Kermit to wait
1413passively for a file to start arriving. Then regain the attention of
1414your desktop software (Alt-x or whatever) and instruct it to send the
1415desired file(s) with Kermit protocol. When the transfer is finished,
1416return to the Connect or Terminal screen.
1417.TP
1418If File Transfer Fails
1419Although every aspect of Kermit's operation can be finely tuned, there
1420are also three short and simple "omnibus tuning" commands you can use
1421for troubleshooting:
1422.RS
1423.TP
1424FAST
1425Use fast file-transfer settings. This has been the default since
1426C-Kermit 7.0 now that most modern computers and connections
1427support it. If transfers fail with fast settings, try . . .
1428.TP
1429CAUTIOUS
1430Use cautious but not paranoid settings. File transfers, if they
1431work, will go at medium speed. If not, try . . .
1432.TP
1433ROBUST
1434Use the most robust, resilient, conservative, safe, and reliable
1435settings. File transfers will almost certainly work, but they
1436will be quite slow (of course this is a classic tradeoff; ROBUST
1437was C-Kermit's default tuning in versions 6.0 and earlier, which
1438made everybody think Kermit protocol was slow). If ROBUST doesn't
1439do the trick, try again with SET PARITY SPACE first in case it's
1440not an 8-bit connection.
1441.RE
1442.sp
1443Obviously the success and performance of a file transfer also depends
1444on C-Kermit's file transfer partner. Up-to-date, real Kermit Project
1445partners are recommended because they contain the best Kermit protocol
1446implementations and because we can support them in case of trouble.
1447.sp
1448If you still have trouble, consult Chapter 10 of Using C-Kermit, or
1449send email to kermit-support@columbia.edu.
1450.TP
1451Advanced Kermit File-Transfer Features
1452Obviously there is a lot more to Kermit file transfer, including all
1453sorts of interactive commands, preferences, options, logging,
1454debugging, troubleshooting, and anything else you can imagine but
1455that's what the manual and updates are for. Here are a few topics you
1456can explore if you're interested by Typing HELP for the listed
1457commands:
1458.RS
1459.TP
1460Logging transfers:
1461LOG TRANSACTIONS (HELP LOG)
1462.TP
1463Automatic per-file text/binary mode switching:
1464SET TRANSFER MODE { AUTOMATIC, MANUAL } (HELP SET TRANSFER).
1465.TP
1466Cross-platform recursive directory tree transfer:
1467SEND /RECURSIVE, GET /RECURSIVE (HELP SEND, HELP GET).
1468.TP
1469File collision options:
1470SET FILE COLLISION { OVERWRITE, BACKUP, DISCARD, ... } (HELP SET FILE).
1471.TP
1472Update: Transfer only files that changed since last time:
1473SET FILE COLLISION UPDATE (HELP SET FILE).
1474.TP
1475Filename selection patterns:
1476(HELP WILDCARD).
1477.TP
1478Flexible file selection:
1479SEND (or GET) /BEFORE /AFTER /LARGER /SMALLER /TYPE /EXCEPT, ...
1480.TP
1481Character-set conversion:
1482SET { FILE, TRANSFER } CHARACTER-SET, ASSOCIATE, ...
1483.TP
1484File/Pathname control:
1485SET { SEND, RECEIVE } PATHNAMES, SET FILE NAMES.
1486.TP
1487Atomic file movement:
1488SEND (or GET) /DELETE /RENAME /MOVE-TO
1489.TP
1490Transferring to/from standard i/o of other commands:
1491SEND (or GET) /COMMAND
1492.TP
1493Recovery of interrupted transfer from point of failure:
1494RESEND, REGET (HELP RESEND, HELP REGET).
1495.RE
1496.TP
1497Non-Kermit File Transfer
1498You can also use C-Kermit to transfer files with FTP or HTTP Internet
1499protocols; see below.
1500.sp
1501On a regular serial or Telnet connection where the other computer
1502doesn't support Kermit protocol at all, you have several options. For
1503example, if your desktop communications software supports Zmodem, use
1504"rz" and "sz" on the host rather than Kermit. But if Kermit is your
1505desktop software, and you are using it to make calls or network
1506connections to other computers that don't support Kermit protocol (or
1507that don't have a good implementation of it), then if your computer
1508also has external X, Y, or Zmodem programs that are redirectable,
1509Kermit can use them as external protocols. HELP SET PROTOCOL for
1510details.
1511.sp
1512You can also capture "raw" data streams from the other computer with
1513LOG SESSION (HELP LOG and HELP SET SESSION-LOG for details), and you
1514can upload files without any protocol at all with TRANSMIT (HELP
1515TRANSMIT, HELP SET TRANSMIT).
1516.SH KERMIT'S BUILT-IN FTP AND HTTP CLIENTS
1517Kermit's FTP client is like the regular Unix FTP client that you're used
1518to, but with some differences:
1519.TP
1520\(bu
1521It has lots more commands and features.
1522.TP
1523\(bu
1524Each FTP command must be prefixed with "ftp", for example "ftp open",
1525"ftp get", "ftp bye", etc (this is not strictly true, but until you're
1526more familiar with it, it's best to follow this rule).
1527.TP
1528\(bu
1529Commands like "cd", "directory", etc, execute locally, not on the
1530server. Use "ftp cd", "ftp dir", etc, to have them act on the server.
1531.TP
1532\(bu
1533You can have an FTP session and a regular Kermit serial or Telnet
1534session open at the same time.
1535.TP
1536\(bu
1537FTP sessions can be fully automated.
1538.PP
1539Pending publication of the next edition of the manual, the Kermit FTP
1540client is thoroughly documented at the Kermit Project website:
1541.sp
1542  http://www.columbia.edu/kermit/ftpclient.html
1543.sp
1544You also can use HELP FTP and HELP SET FTP to get descriptions of Kermit's
1545FTP-related commands.
1546.PP
1547The HTTP client is similar to the FTP one, except you prefix each command
1548with HTTP instead of FTP: HTTP OPEN, HTTP GET, HTTP PUT, HTTP CLOSE, etc.
1549Type HELP HTTP for details, or visit the to view the manual supplements.
1550HTTP connections can be open at the same time as regular serial or Telnet
1551connections and FTP connections. So Kermit can manage up to three types
1552connections simultaneously.
1553.SH INTERNET KERMIT SERVICE
1554C-Kermit can be configured and run as an Internet service (called IKSD),
1555similar to an FTP server (FTPD) except you can (but need not) interact with
1556it directly, plus it does a lot more than an FTP server can do. The TCP
1557port for IKSD is 1649. It uses Telnet protocol. C-Kermit can be an Internet
1558Kermit Server, or it can be a client of an IKSD. You can make connections
1559from C-Kermit to an IKSD with any of the following commands:
1560.sp
1561.nf
1562  telnet foo.bar.edu 1649
1563  telnet foo.bar.edu kermit   ; if "kermit" is listed in /etc/services
1564  iksd foo.bar.edu
1565.fi
1566.sp
1567The IKSD command is equivalent to a TELNET command specifying port 1649.
1568For more information about making and using connections to an IKSD, see:
1569.sp
1570  http://www.columbia.edu/kermit/cuiksd.html
1571.sp
1572You can run an Internet Kermit Service on your own computer too (if you are
1573the system administrator). For instructions, see:
1574.sp
1575  http://www.columbia.edu/kermit/iksd.html
1576.SH SECURITY
1577All of C-Kermit's built-in TCP/IP networking methods (Telnet, Rlogin, IKSD,
1578FTP, and HTTP) can be secured by one or more of the following IETF-approved
1579methods:
1580.PP
1581\(bu    MIT Kerberos IV
1582.br
1583\(bu    MIT Kerberos V
1584.br
1585\(bu    SSL/TLS
1586.br
1587\(bu    Stanford SRP
1588.PP
1589For complete instructions see:
1590.PP
1591  http://www.columbia.edu/kermit/security.html
1592.PP
1593And as noted previously, you can also make SSH connections with C-Kermit if
1594you already have an SSH client installed.
1595.SH ALTERNATIVE COMMAND-LINE PERSONALITIES
1596When invoked as "kermit" or any other name besides "ftp" or "telnet",
1597C-Kermit has the command-line options described above in the OPTIONS
1598section. However, if you invoke C-Kermit as "telnet" or "ftp", it changes
1599its command-line personality to match. This can be done (among other ways)
1600with symbolic links (symlinks). For example, if you want C-Kermit to be
1601your regular Telnet client, or the Telnet helper of your Web browser, you
1602can create a link like the following in a directory that lies in your PATH
1603ahead of the regular telnet program:
1604.sp
1605  ln -s /usr/local/bin/kermit telnet
1606.sp
1607Now when you give a "telnet" command, you are invoking Kermit instead, but
1608with its Telnet command-line personality so, for example:
1609.sp
1610  telnet xyzcorp.com
1611.sp
1612Makes a Telnet connection to xyzcorp.com, and Kermit exits automatically
1613when the connection is closed (just like the regular Telnet client). Type
1614"telnet -h" to get a list of Kermit's Telnet-personality command-line
1615options, which are intended to be as compatible as possible with the
1616regular Telnet client.
1617.PP
1618Similarly for FTP:
1619.sp
1620  ln -s /usr/local/bin/kermit ftp
1621.sp
1622And now type "ftp -h" to see its command-line options, and command lines
1623just like you would give your regular FTP client:
1624.sp
1625  ftp xyzcorp.com
1626.sp
1627but with additional options allowing an entire session to be specified on
1628the command line. Finally, if Kermit's
1629first command-line option is a Telnet, FTP, IKSD, or HTTP URL, Kermit
1630automatically makes the appropriate kind of connection and, if indicated by
1631the URL, takes the desired action:
1632.TP
1633kermit telnet:xyzcorp.com
1634Opens a Telnet session
1635.TP
1636kermit telnet://olga@xyzcorp.com
1637Ditto for user olga
1638.TP
1639kermit ftp://olga@xyzcorp.com/public/oofa.zip
1640Downloads a file
1641.TP
1642kermit kermit://kermit.columbia.edu/kermit/f/READ.ME
1643Ditto for IKSD
1644.TP
1645kermit iksd://kermit.columbia.edu/kermit/f/READ.ME
1646(This works too)
1647.TP
1648kermit http://www.columbia.edu/kermit/index.html
1649Grabs a web page
1650.fi
1651.SH LICENSE
1652C-Kermit has an unusual license, but a fair and sensible one since the
1653Kermit Project must support itself out of revenue: it's not a BSD license,
1654not GPL, not Artistic, not commercial, not shareware, not freeware. It can
1655be summed up like this: if you want C-Kermit for your own use, you can
1656download and use it without cost or license (but we'd appreciate it if you
1657would purchase the manual). But if you want to sell C-Kermit or bundle it
1658with a product or otherwise distribute it in a commercial setting EXCEPT
1659WITH AN OPEN-SOURCE OPERATING SYSTEM DISTRIBUTION such as Linux, FreeBSD,
1660NetBSD, or OpenBSD, you must license it. To see the complete license, give
1661the LICENSE command at the prompt, or see the COPYING.TXT file distributed
1662with C-Kermit 7.0 or later, or download it from
1663.sp
1664  ftp://kermit.columbia.edu/kermit/c-kermit/COPYING.TXT
1665.sp
1666Send licensing inquiries to kermit@columbia.edu.
1667.SH BUGS
1668See the following files for listings of known bugs, limitations,
1669workarounds, hints and tips:
1670.TP
1671ckcbwr.txt
1672General C-Kermit bugs, hints, tips.
1673.TP
1674ckubwr.txt
1675Unix-specific C-Kermit bugs, hints, tips.
1676.PP
1677Report bugs and problems by email to:
1678.sp
1679   kermit-support@columbia.edu.
1680.sp
1681Before requesting technical support, please read the hints here:
1682.sp
1683  http://www.columbia.edu/kermit/support.html
1684.sp
1685and also read the C-Kermit Frequently Asked Questions:
1686.sp
1687  http://www.columbia.edu/kermit/ckfaq.html
1688.SH OTHER TOPICS
1689There's way more to C-Kermit than we've touched on here -- troubleshooting,
1690customization, character sets, dialing directories, sending pages, script
1691writing, and on and on, all of which are covered in the manual and updates
1692and supplements. For the most up-to-date information on documentation (or
1693updated documentation itself) visit the Kermit Project website:
1694.sp
1695  http://www.columbia.edu/kermit/
1696.PP
1697There you will also find Kermit software packages for other platforms:
1698different Unix varieties, Windows, DOS, VMS, IBM mainframes, and many
1699others: 20+ years' worth.
1700.SH DOCUMENTATION AND UPDATES
1701The manual for C-Kermit is:
1702.TP
1703.I
1704Using C-Kermit
1705Frank da Cruz and Christine M. Gianone,
1706Second Edition, Digital Press / Butterworth-Heinemann, Woburn, MA, 1997, 622
1707pages, ISBN 1-55558-164-1. This is a printed book. It covers C-Kermit 6.0.
1708.TP
1709The C-Kermit 7.0 Supplement
1710http://www.columbia.edu/kermit/ckermit2.html
1711.TP
1712The C-Kermit 8.0 Supplement
1713http://www.columbia.edu/kermit/ckermit3.html
1714.PP
1715Visit C-Kermit home page:
1716.sp
1717  http://www.columbia.edu/kermit/ckermit.html
1718.sp
1719to learn about new versions, Beta tests, and other news; to
1720read case studies and tutorials; to download source code, install packages,
1721and prebuilt binaries for many platforms. Also visit:
1722.TP
1723http://www.columbia.edu/kermit/scriptlib.html
1724The Kermit script library and tutorial
1725.TP
1726http://www.columbia.edu/kermit/newfaq.html
1727The Kermit FAQ (Frequently Asked Questions about Kermit)
1728.TP
1729http://www.columbia.edu/kermit/ckfaq.html
1730The C-Kermit FAQ (Frequently Asked Questions about C-Kermit)
1731.TP
1732http://www.columbia.edu/kermit/telnet.html
1733C-Kermit Telnet client documentation
1734.TP
1735http://www.columbia.edu/kermit/security.html
1736C-Kermit security documentation (Kerberos, SSL/TLS, etc)
1737.TP
1738http://www.columbia.edu/kermit/cuiksd.html
1739Internet Kermit Service user documentation
1740.TP
1741http://www.columbia.edu/kermit/iksd.html
1742Internet Kermit Service administrator documentation
1743.TP
1744http://www.columbia.edu/kermit/studies.html
1745Case studies.
1746.TP
1747http://www.columbia.edu/kermit/support.html
1748Technical support.
1749.TP
1750http://www.columbia.edu/kermit/k95tutorial.html
1751Kermit 95 tutorial.
1752.TP
1753comp.protocols.kermit.misc
1754The Kermit newsgroup (unmoderated).
1755.SH FILES
1756.TP
1757COPYING.TXT
1758C-Kermit license.
1759.TP
1760~/.kermrc
1761Initialization file.
1762.TP
1763~/.mykermrc
1764Customization file.
1765.TP
1766~/.kdd
1767Kermit dialing directory (see manual).
1768.TP
1769~/.knd
1770Kermit network directory (see manual).
1771.TP
1772~/.ksd
1773Kermit services directory (see manual).
1774.TP
1775ca_certs.pem
1776Certificate Authority certifcates used for SSL connections.
1777.TP
1778ckuins.txt
1779Installation instructions for Unix.  Also at
1780http://www.columbia.edu/kermit/ckuins.html.
1781.TP
1782ckcbwr.txt
1783General C-Kermit bugs, hints, tips.
1784.TP
1785ckubwr.txt
1786Unix-specific C-Kermit bugs, hints, tips.
1787.TP
1788ckcplm.txt
1789C-Kermit program logic manual.
1790.TP
1791ckccfg.txt
1792C-Kermit compile-time configuration options.
1793.TP
1794ssh
1795(in your PATH) SSH connection helper.
1796.TP
1797rz, sz, etc.
1798(in your PATH) external protocols for XYZmodem.
1799.TP
1800/var/spool/locks (or whatever)
1801UUCP lockfile for dialing out (see installation instructions).
1802.SH AUTHORS
1803.TP
1804Software
1805Frank da Cruz and Jeffrey E Altman,
1806.br
18071985-present, with contributions from hundreds of others all over the
1808world.
1809.TP
1810Documentation
1811Frank da Cruz and Christine M Gianone
1812.TP
1813Address
1814.nf
1815The Kermit Project - Columbia Univerity
1816612 West 115th Street
1817New York NY 10025-7799
1818USA
1819.fi
1820.TP
1821E-Mail
1822kermit@columbia.edu
1823.TP
1824Web
1825http://www.columbia.edu/kermit/
1826.fi
1827.br
Note: See TracBrowser for help on using the repository browser.