The Kermit Project
|
Now hosted by
Panix.com
New York City USA
•
kermit@kermitproject.org
…since
1981
|
Frank da CruzThis is not a tutorial or a getting-started or a how-to; it is a description of every single command in C-Kermit 10.0, about 900 of them. For a tutorial, please visit the new C-Kermit 10.0 tutorial, or the online version of the book Using C-Kermit. Other references include:
19 October 2022
Last update: Thu Feb 29 13:15:32 2024
Length if printed: About 7000 lines or 130 pages.
Platform | Filename | Location |
---|---|---|
Unix (Linux, BSD, macOS, etc) | .kermrc | Your home (login) directory |
MS Windows | k95custom.ini | \v(appdata) (your application data directory) |
IBM OS/2 | k2custom.ini | \v(appdata) (your application data directory) |
VMS, OpenVMS | ckermit.ini | Your home (login) directory |
Other | ckermit.ini | Your home (login) directory |
Declares arrays and performs various operations on them. Array references have the following syntax:
\&a[n]where "a" is a letter and n is a number or a variable with a numeric value or an arithmetic expression. The value of an array element can be anything at all -- a number, a character, a string, a filename, etc.
More about arrays HERE. The following ARRAY verbs are available:
array declare \&a[20] declare \&a[20] declare \&f[20] = 0 1 1 2 3 5 8 13 21 34 55 89 144 dcl &w[] = each word is an array element dcl p[] = {each word} {pair is} {an element}
Declares an array of the given size, n. The '\' and '&' in the array name are optional in the declaration and are supplied automtically if omitted. The resulting array has n+1 elements, 0 through n. Array elements can be used just like any other variables. Initial values can be given for elements 1, 2, ... by including = followed by one or more values separated by spaces. If you omit the size, the array is sized according to the number of initializers; if none are given the array is destroyed and undeclared if it already existed. The ARRAY keyword is optional. Various built-in functions are available for array operations; see HELP FUNCTION for details. These include \fdimension(), \farraylook(), \ffiles(), \fsplit(), and many more.
An array can have only one dimension but two-dimensional or, in fact, any-dimensional arrays can be constructed as shown HERE (briefly, you can define macros whose names look like two-dimensional array references:
_assign a[\%r][\%i] desired-value
array clear \%a[22:38]
array set \%a 0You may specify a range to set a segment of the array, e.g.:
array set \%a[2:9] 0
ASK \%n { What is your name\? }Issues the prompt and defines the variable to be whatever is typed in response, up to the terminating carriage return. Use braces to preserve leading and/or trailing spaces in the prompt. Quote '?' with backslash to prevent it from issuing a context-sensitive help message. Switches:
ASSIGN \%a My name is \%b.Assigns the current value of the string to the variable (or macro). The definition string is fully evaluated before it is assigned, so that the values of any variables that are contained are used, rather than their names. Compare with DEFINE. To illustrate the difference, try this:
DEFINE \%a hello DEFINE \%x \%a ASSIGN \%y \%a DEFINE \%a goodbye ECHO \%x \%yThis prints 'goodbye hello'.
Like ASSIGN, but the name of the variable is evaluated before making the assignment, whereas ASSIGN takes it literally.
set browser lynx browse https://kermitproject.orgStarts your preferred Web browser (specified in your most recent SET BROWSER command) on the given URL, or if none given, the most recently visited URL, if any.
If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection, this command is equivalent to REMOTE CD (RCD). Otherwise:
Change Directory. Changes your current, working, default directory to the one given, so that future non-absolute filename references are relative to this directory. If the directory name is omitted from this command, your home (login) directory is supplied. C-Kermit's default prompt shows your current directory.
Synonyms: LCD, CWD. Also see:
SET LOCUS, PWD, CDUP, BACK, REMOTE CD (RCD), SET CD,
SET PROMPT.
And see: HELP KCD.
Relevant environment variables: CDPATH, HOME.
Changes all occurrences of string1 to string2 in the given file or files. Works line by line, does not do multiline or across-line substitutions. To remove strings from files, specify string2 as "" or omit string2. Temporary files are created in the directory indicated by \v(tmpdir) (show var tmpdir). You can select a different temporary directory with the SET TEMP-DIRECTORY command. All temporary files are deleted after use.
string1 and string2 should be enclosed in "doublequotes" or {braces} if if they contain spaces. In the event that they already contain braces or doublequotes, especially if these are not balanced, some \-quoting may be required. Or you can assign the strings to variables and then use the variable names in the CHANGE command; example:
.a = {value="./ .b = {value="../ change *.html \m(a) \m(b)Since the CHANGE command works line by line, only text files can be changed; C-Kermit automatically skips over binary files.
/AFTER: | Select files modified after the given date | |
/BEFORE: | Select files modified before the given date | |
/LARGER: | Select files larger than the given size in bytes | |
/SMALLER: | Select files smaller than the given size in bytes | |
/EXCEPT: | Exclude the given files (list or pattern) | |
/DOTFILES | Include files whose names start with dot (period). | |
/NODOTFILES | + | Don't include files whose names start with dot. |
/RECURSIVE | Descend through subdirectories. | |
/NORECURSIVE | + | Don't descend through subdirectories. |
/BACKUP:name | Back up original files to named directory. |
/DESTINATION:name | Store resulting changed files in named directory. |
If neither of these options is given, original files are overwritten.
/CASE:{ ON,OFF } | OFF (default) = ignore case in string1; ON = don't ignore |
/COUNT:name | Set named variable to number of files that were changed. |
/SIMULATE | List files that would be changed, but don't change them. |
/LIST | Show which files are being changed. |
/MODTIME: | Modification time for change files, PRESERVE or UPDATE. |
/FILES | Only change permissions of regular files. |
/DIRECTORIES | Only change permissions of directory files. |
/TYPE:BINARY | Only change permissions of binary files. |
/TYPE:TEXT | Only change permissions of text files. |
/DOTFILES | Include files whose names begin with dot (.). |
/RECURSIVE | Change permissions in subdirectories too. |
/LIST | List each file (synonym: /VERBOSE). |
/NOLIST | Operate silently (synonym: /QUIET). |
/PAGE | When listing, pause at end of each screen (implies /LIST). |
/NOPAGE | When listing, don't pause at end of each screen. |
/SIMULATE | Show what would be done but don't actually do it. |
Clears the named item. If no item is named, DEVICE-AND-INPUT is assumed.
ALARM | Clears any pending alarm (see SET ALARM). |
APC-STATUS | Clears Application Program Command status. |
BINARY-PATTERNS | Clears the file binary-patterns list. |
DEVICE | Clears the current port or network input buffer. |
DEVICE-AND-INPUT | Clears both the device and the INPUT buffer. |
DIAL-STATUS | Clears the \v(dialstatus) variable. |
INPUT | Clears the INPUT-command buffer and the \v(input) variable. |
KEYBOARD-BUFFER | Clears the command terminal keyboard input buffer. |
SEND-LIST | Clears the current SEND list (see ADD). |
TEXT-PATTERNS | Clears the file text-patterns list. |
CX-LOG | (connection log, opened with LOG CX) |
SESSION-LOG | (opened with LOG SESSION) |
TRANSACTION-LOG | (opened with LOG TRANSACTIONS) |
PACKET-LOG | (opened with LOG PACKETS) |
DEBUG-LOG | (opened with LOG DEBUG) |
READ-FILE | (opened with OPEN READ) |
WRITE-FILE | (opened with OPEN WRITE or OPEN APPEND) |
Type HELP LOG and HELP OPEN for further info.
Include the /QUIETLY switch to suppress the informational message that tells you how to escape back, etc. CQ is a synonym for CONNECT /QUIETLY.
Other switches include:
/TRIGGER:{{string1}{string2}...{stringn}}Upon return from CONNECT mode, the variable \v(trigger) is set to the trigger string, if any, that was actually encountered. The trigger value, like all other CONNECT switches, applies only to the CONNECT command with which it is given, and overrides (temporarily) any global SET TERMINAL TRIGGER string that might be in effect.
Your escape character is Ctrl-\ (ASCII 28, FS)"which tells you how to return to the C-Kermit prompt.
Converts file1 from the character set cs1 into the character set cs2 and stores the result in file2. The character sets can be any of C-Kermit's file character sets; to see a list type "set file character-set ?" at the C-Kermit> prompt. If file2 is omitted, the translation is displayed on the screen. An appropriate intermediate character-set is chosen automatically, if necessary. Example:
CONVERT lasagna.txt latin1 utf8 lasagna-utf8.txtMultiple files can be translated if file2 is a directory or device name, rather than a filename, or displayed on the screen if file2 is omitted. TRANSLATE was the original name of this command but it implies that the language is being translated; CONVERT is new to C-Kermit 10.0 but of course TRANSLATE still works.
The following shortcuts can also be used in place of dates:
Timezone specifications are similar to those used in e-mail and HTTP headers, either a USA timezone name, e.g. EST, or a signed four-digit timezone offset, {+,-}hhmm, e.g., -0500; it is used to convert date-time, a local time in that timezone, to GMT which is then converted to the local time at the host. If no timezone is given, the date-time is local. To convert local time (or a time in a specified timezone) to UTC (GMT), use the function \futcdate().
Delta times are given as:
A date in the future/past relative to the date-time; date-units may be DAYS, WEEKS, MONTHS, YEARS: +3days, -7weeks, +3:00, +1month 8:00.{+,-} [number date-units][hh[:mm[:ss]]]
All the formats shown above are acceptable as arguments to date-time switches for such as /AFTER: or /BEFORE: in commands like SEND and DIRECTORY, and to functions such as \fcvtdate(), \fdiffdate(), and \futcdate(), that take date-time strings as arguments.
Decrement (subtract one from) the value of a variable if the current value is numeric. If an optional amount is specified (as a number, a variable, or an arithmetic expression that evaluates to a number, or any combination) the variable is decremented by that number instead of 1. The result is always an integer. If floating-point numbers are given, the result is truncated.
Examples: DECR \%a, DECR days 7, DECR x \%n, DECR sum \%x+12
A one-line macro definition looks like this:
DEFINE name command, command, command, ...for example:
DEFINE vax set parity even, set duplex full, set flow xon/xoffwhich defines a Kermit command macro called 'vax'. The definition is a comma-separated list of Kermit commands.
A multiline macro definition looks like this:
DEFINE average { # Define a macro called "average" .sum = 0 # Initialize the sum for i 1 \v(argc) 1 { # Loop through all the arguments increment sum \&_[i] # Add each one to the sum } .avg := \fsexp(/ sum i) # Divide by number of arguments echo Average = \m(avg) # Show the result }Use the DO command to execute the macro, or just type its name, followed optionally by arguments, for example:
C-Kermit>average 1 2 3 4 Average = 1.833333333333333 C-Kermit>
The definition of a variable can be anything at all, for example:
DEFINE \%a Monday DEFINE \%b 3 DEFINE year 2022 ("twenty twenty-two")These variables can be used almost anywhere, for example:
ECHO Today is \%a SET BLOCK-CHECK \%b ECHO This year is \m(year)
Like DEFINE, but the name of the variable is evaluated before making the assignment, whereas DEFINE takes it literally. Example:
define n size _define \m(n) 50 echo \m(size) 50More about this topic HERE.
If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection, this command is equivalent to REMOTE DELETE (RDELETE). Otherwise:Deletes a file or files on the computer where C-Kermit is running. The filespec may denote a single file or can include wildcard characters to match multiple files. RM is a synonym for DELETE. Switches include:
/EXCEPT:{{pattern1}{pattern2}...}
Use SET OPTIONS DELETE to make selected switches effective for every DELETE command unless you override them; use SHOW OPTIONS to see selections currently in effect. Also see SET LOCUS, HELP PURGE, HELP WILDCARD.
Dials a number using an autodial modem. First you must SET MODEM TYPE, then SET LINE (to choose the serial port device on your computer), then SET SPEED. Then give the DIAL command, including the phone number, for example:
DIAL 7654321If the modem is on a network modem server, SET HOST first, then SET MODEM TYPE, then DIAL.
If you give the DIAL command interactively at the Kermit prompt, and the call is placed successfully (i.e. it is answered by the modem on the far side), Kermit automatically enters CONNECT mode. If the DIAL command is given from a macro or command file, Kermit remains in command mode after the call is placed, successfully or not. You can change this behavior with the SET DIAL CONNECT command.
If the phonenumber starts with a letter, and if you have used the SET DIAL DIRECTORY command to specify one or more dialing-directory files, Kermit looks it up in the given file(s); if it is found, the name is replaced by the number or numbers associated with the name. If it is not found, the name is sent to the modem literally.
If the phonenumber starts with an equals sign ("="), this forces the part after the = to be sent literally to the modem, even if it starts with a letter, without any directory lookup.
You can also give a list of phone numbers enclosed in braces, e.g:
dial {{7654321}{8765432}{+1 (212 555-1212}}(Each number is enclosed in braces and the entire list is also enclosed in braces.) In this case, each number is tried until there is an answer. The phone numbers in this kind of list can not be names of dialing directory entries.
A dialing directory is a plain text file, one entry per line:
name phonenumber ; commentsfor example:
work 9876543 ; This is a comment e-mail +1 (212) 555 4321 ; My electronic mailbox germany +49 (511) 555 1234 ; Our branch in HanoverIf a phone number starts with +, then it must include country code and (in most cases) an area code, and C-Kermit will try to handle these appropriately based on the current locale (HELP SET DIAL for further info); these are called PORTABLE entries. If it does not start with +, it is dialed literally.
If more than one entry is found with the same name, Kermit dials all of them until the call is completed; if the entries are in portable format, Kermit dials them in cheap-to-expensive order: internal, then local, then long-distance, then international, based on its knowledge of your local country code and area code (see HELP SET DIAL).
Specify your dialing directory file(s) with the SET DIAL DIRECTORY command.
See also SET DIAL, SET MODEM, SET LINE, SET HOST, SET SPEED, REDIAL, and PDIAL.
If LOCUS is REMOTE or LOCUS is AUTO and you have an FTP connection, this command is equivalent to REMOTE DIRECTORY (RDIR). Otherwise:Lists local files. The filespec may be a filename, possibly containing wildcard characters, or a directory name. If no filespec is given, all files in the current directory are listed. If a directory name is given, all the files in it are listed. Multiple filespecs can be given. Optional switches ('+' indicates factory defaults):
/BRIEF | List filenames only. | |
/VERBOSE | + | Also list permissions, size, and date. |
/FILES | Show files but not directories. | |
/DIRECTORIES | Show directories but not files. | |
/ALL | + | Show both files and directories. |
/ARRAY:&a | Store file list in specified array (e.g. \&a[]). | |
/PAGE | Pause after each screenful. | |
/NOPAGE | Don't pause after each screenful. | |
/TOP:n | Only show the top n lines of the directory listing. | |
/DOTFILES | Include files whose names start with dot (period). | |
/NODOTFILES | + | Don't include files whose names start with dot. |
/FOLLOWLINKS | Follow symbolic links. | |
/NOFOLLOWLINKS | + | Don't follow symbolic links. |
/NOLINKS | Don't list symbolic links at all. | |
/BACKUP | + | Include backup files (names end with .~n~). |
/NOBACKUPFILES | Don't include backup files. | |
/OUTPUT:file | Store directory listing in the given file. | |
/HEADING | Include heading and summary. | |
/NOHEADING | + | Don't include heading or summary. |
/COUNT:var | Put the number of matching files in the given variable. | |
/SUMMARY | Print only count and total size of matching files. | |
/XFERMODE | Show pattern-based transfer mode (T=Text, B=Binary). | |
/TYPE: | Show only files of the specified type (text or binary). | |
/MESSAGE:text | Add brief message to each listing line. | |
/NOMESSAGE | + | Don't add message to each listing line. |
/NOXFERMODE | + | Don't show pattern-based transfer mode |
/ISODATE | + | In verbose listings, show date in ISO 8061 format. |
/ENGLISHDATE | In verbose listings, show date in "English" format. | |
/RECURSIVE | Descend through subdirectories. | |
/SORT:key | Sort by key, NAME, DATE, or SIZE; default key is NAME. | |
/NOSORT | + | Don't sort. |
/ASCENDING | + | If sorting, sort in ascending order. |
/REVERSE | If sorting, sort in reverse order. |
Default for paging depends on SET COMMAND MORE-PROMPTING. Use SET OPTIONS DIRECTORY [ switches ] to change defaults; use SHOW OPTIONS to display customized defaults. Also see WDIRECTORY.
Security for the Kermit server. Prevents the client Kermit program from executing the named REMOTE command, such as CD, DELETE, RECEIVE, etc. For setting up a Kermit server. Denies the client Kermit program access to the named capability, such as CD, DELETE, RECEIVE, etc. Opposite of ENABLE. Type "disable ?" for a list capalities that can be disabled.
EVALUATE \%n (1+1) * (\%a / 3)NOTE: Prior to C-Kermit 7.0, the syntax was "EVALUATE expression" (no variable), and the result was printed. Use SET EVAL { OLD, NEW } to choose the old or new behavior, which is NEW by default.
Alse see: HELP FUNCTION EVAL.
The FILE commands are:
Full command | Shortcut | Description |
---|---|---|
FILE OPEN | FOPEN | Open a local file. |
FILE CLOSE | FCLOSE | Close an open file. |
FILE READ | FREAD | Read data from an open file. |
FILE WRITE | FWRITE | Write data to an open file. |
FILE LIST | FLIST | List open files. |
FILE STATUS | FSTATUS | Show status of a channel. |
FILE REWIND | FREWIND | Rewind an open file |
FILE COUNT | FCOUNT | Count lines or bytes in an open file |
FILE SEEK | FSEEK | Seek to specified spot in an open file. |
FILE FLUSH | FFLUSH | Flush output buffers for an open file. |
Type HELP FILE OPEN or HELP FOPEN for details about FILE OPEN;
type HELP FILE CLOSE or HELP FCLOSE for details about FILE CLOSE, and so on.
The following variables are related to the FILE command:
\v(f_max) | Maximum number of files that can be open at once |
\v(f_error) | Completion code of most recent FILE command or function |
\v(f_count) | Result of most recent FILE COUNT command |
The following functions are related to the FILE command:
\F_eof() | Check if channel is at EOF |
\F_pos() | Get channel read/write position (byte number) |
\F_line() | Get channel read/write position (line number) |
\F_handle() | Get file handle |
\F_status() | Get channel status |
\F_getchar() | Read character |
\F_getline() | Read line |
\F_getblock() | Read block |
\F_putchar() | Write character |
\F_putline() | Write line |
\F_putblock() | Write block |
\F_errmsg() | Error message from most recent FILE command or function |
Type HELP FUNCTION function-name for information about each one.
fopen /read \%i inputfile.txt fopen /write \%o outputfile.txtFOPEN allocates a new channel number and assigns to the variable (
Here are the FOPEN switches in logical order, rather than alphabetical:
FWRITE \%o "This is some text."adds the appropriate terminator (CR or CRLF) to the text when writing it.
FOR \%i 10 1 -1 { pause 1, echo \%i }The variable is
FTP is the ARPANET's original File Transfer Protocol dating from 1971, and of the Internet that ARPANET spawned, until about 2020 when it was unceremoniously "deprecated" and virtually banished for security reasons in spite of the fact that secure FTP servers and clients have been available since 2005, and C-Kermit is one of them. If you need to access a service that requires secure FTP, you can use C-Kermit 10.0, provided it was built with OpenSSL (e.g. "make linux+ssl"; you can check this at the C-Kermit prompt with "check ssl").
For complete and thorough
documentation of the Kermit FTP client, CLICK
HERE (it's almost a book!).
Issues the prompt and sets the variable to the first character you type.
Use braces or doublequotes to preserve leading and/or trailing spaces in the
prompt. GETC switches:
Searches through the given file or files for the given character string
or pattern. In the normal case, all lines containing any text that matches
the pattern are printed. Pattern syntax is as
described HERE except that '*' is implied at the
beginning unless the pattern starts with '^' and also at the end unless
the pattern ends with '$'. Therefore, "grep something *.txt" lists all
lines in all *.txt files that contain the word "something", but "grep
^something *.txt" lists only the lines that START with "something". The
command succeeds if any of the given files contained any lines that match
the pattern, otherwise it fails. Synonym: FIND.
File selection options (switches):
Hangs up the phone or closes the network connection.
If the condition is (is not) true, then do (don't do) the commandlist. The
commandlist can be a single command, or a list of commands separated by
commas or enclosed in braces. The condition can be a single condition or a
group of conditions separated by AND (&&) or OR (||) and enclosed in
parentheses. If parentheses are used they must be surrounded by spaces.
Examples:
The IF command may be followed on the next line by an ELSE command. Example:
The text, if given, can be a regular text or it can be a \fpattern()
invocation, in which case it is treated as a pattern rather than a literal
string; see PATTERNS for details.
If the /COUNT: switch is included, INPUT waits for the given number of
characters to arrive.
If no text is specified, INPUT waits for the first character that arrives
and makes it available in the \v(inchar) variable. This is equivalent to
including a /COUNT: switch with an argument of 1.
If the /NOMATCH switch is included, INPUT does not attempt to match any
characters, but continues reading from the communication connection until
the timeout interval expires. If the timeout interval is 0, the INPUT
command does not wait; i.e. the given text must already be available for
reading for the INPUT command to succeed. If the interval is negative,
the INPUT command waits forever.
The INPUT buffer, \v(input), is normally circular. Incoming material is
appended to it until it reaches the end, and then it wraps around to the
beginning. If the /CLEAR switch is given, INPUT clears its buffer before
reading from the connection.
Typical example of use:
\v(instatus) values are: 0 (success), 1 (timed out), 2 (keyboard interrupt),
3 (internal error), 4 (I/O error or connection lost), 5 (INPUT disabled),
and 6 (buffer filled and /NOWRAP set); these are shown by \v(inmessage).
Also see OUTPUT, MINPUT, REINPUT, SET INPUT and CLEAR. See PAUSE for
details on time-of-day format and HELP PATTERNS for pattern syntax.
Kermit Change Directory: Like CD but (a) always acts
locally, and (b) takes a symbolic directory name rather than an actual
directory name. The symbolic names correspond to Kermit's directory-valued
built-in variables, such as \v(download), \v(exedir), and so on. Here's the
list:
Also see CD, SET FILE DOWNLOAD, SET TEMP-DIRECTORY.
Creates a Kermit script program based on the actions you perform; for example,
dialing up and logging in to a frequently used host. Include a filename to
start recording. Then you can give a LEARN /OFF command to temporarily stop
recording and LEARN /ON to resume recording. After LEARN /CLOSE or exit
from Kermit, your script is available for execution by the TAKE command, and
of course you can edit as desired.
Looks up the given name in the dialing directory or directories, if any,
specified in the most recent SET DIAL DIRECTORY command. Each matching
entry is shown, along with any transformations that would be applied to
portable-format entries based on your locale. HELP DIAL, HELP SET DIAL
for further info.
For use in script programs that interact with another computer. Waits up to
n seconds for any one of the strings to arrive on the communication
device. If no strings are given, the command waits for any character at all
to arrive. Strings are separated by spaces; use {braces} or "doublequotes"
for grouping. If any of the strings is encountered within the timeout
interval, the command succeeds and the \v(minput) variable is set to the
number of the string that was matched: 1, 2, 3, etc. If none of the strings
arrives, the command times out, fails, and \v(minput) is set to 0. In all
other respects, MINPUT is like INPUT. See INPUT for
the available switches and other details of operation.
Asks a remote Kermit server send a group of files.
Just like GET except MGET allows a list of remote file
specifications, separated by spaces. Each file specification can be for a
single file or a "wildcard" indicating a group
files, and they can be in different directories.
This is an obsolete (but still functional) way to open files on the the same
computer where C-Kermit is running. For use with the READ and WRITE
commands. The OPEN command opens the local file in the specified mode:
READ, WRITE, or APPEND. !READ and !WRITE mean to read from or write to a
system command rather than a file. Examples:
Do nothing for the specified number of seconds or until the given time of
day in 24-hour hh:mm:ss notation. If the time of day is earlier than the
current time, it is assumed to be tomorrow. If no argument given, one
second is used. The pause can be interrupted by typing any character on
the keyboard unless SLEEP CANCELLATION is OFF. If interrupted, PAUSE
fails, otherwise it succeeds. Synonym: SLEEP.
Wait for a file to arrive from the other Kermit, which must be given a SEND
command. If the optional asname is given, the incoming file is stored
under that name, otherwise it will be stored under the name it arrives with.
If the filespec denotes a directory, the incoming file or files will be
stored with its own name in that directory.
Optional switches include:
Run the given local computer (not Kermit) command with its standard input
and output redirected to the current SET LINE or SET HOST communications
path.
Used to resume an interrupted file transfer from the point of failure.
Asks the Kermit server that is on the other end of the connection
to resume sending from where it left off last time. Works for
binary-mode transfers and — only on computers that have the same
text-file format — text files too.
REMOVE BINARY-PATTERNS [ pattern [ pattern ... ] ]
REMOVE TEXT-PATTERNS [ pattern [ pattern ... ] ]
Renames the source file (name1) to the target name2. If
name2 is a directory, name1 is allowed to contain wildcards,
and the file(s) matching name1 are moved to directory name2,
subject to rules of the underlying operating system regarding renaming
across disk boundaries, etc. Switches:
~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don't
append a return, and ~o[o[o]] for octal of a character. As with some
UUCP systems, sent strings are followed by ~r unless they end with ~c.
Only the last 7 characters in each expect are matched. A null expect,
e.g. ~0 or two adjacent dashes, causes a short delay. If you expect
that a sequence might not arrive, as with uucp, conditional sequences
may be expressed in the form:
Sends the file or files indicated by filespec. If the filespec is omitted
the SEND-LIST (if any) is used (see ADD). The filespec may
contain wildcard characters. An asname may be given to specify the name(s)
the files(s) are sent under; if multiple files are being sent the asname
must contain variables such as \v(filename). If the asname is omitted,
each file is sent under its own name. Also see HELP MSEND, HELP WILDCARD.
Optional switches include:
Enter server mode on the current connection. All further commands
are taken in packet form from the other Kermit program. Use FINISH,
BYE, or REMOTE EXIT to get C-Kermit out of server mode.
Makes an SSH connection using the external ssh program via the SET SSH
COMMAND string, which is "ssh -e none" by default. Options for the
external ssh program may be included. If the hostname is followed by a
command, the command is executed on the host instead of an interactive
shell.
C-Kermit for Windows has its own built-in SSH (Secure Shell) client, where
the SSH command performs SSH-related actions as follows:
Keys are stored using the OpenSSH keyfile format. The private key
files can be (optionally) protected by specifying a passphrase. A
passphrase is a longer version of a password. English text provides
no more than 2 bits of key data per character. 56-bit keys can be
broken by a brute force attack in approximately 24 hours. When used,
private key files should therefore be protected by a passphrase of at
least 40 characters (about 80 bits).
To install a public key file on the host, you must transfer the file
to the host and append it to your "authorized_keys" file. The file
permissions must be 600 (or equivalent).
An example of a /COMMAND to execute C-Kermit in SERVER mode is:
Stop executing the current macro or TAKE file and return immediately to
the Kermit prompt. Number is a return code. Message printed if given.
Also see END.
(Unix only)
Suspends Kermit. Continue Kermit with the appropriate shell command,
such as fg.
Selects from a group of commands based on the value of a variable.
The case-list is a series of lines like these:
Shows the last part of a file on your screen.
Equivalent to TYPE /TAIL filename and has all the same switches;
see TYPE.
Tells Kermit to execute commands from the named file. Optional argument
words are automatically assigned to the macro argument variables \%1
through \%9. Kermit command files may themselves contain TAKE commands,
up to any reasonable depth of nesting.
Equivalent to SET NETWORK TYPE TCP/IP, SET HOST host [ service ] /TELNET,
IF SUCCESS CONNECT. If host is omitted, the previous connection (if any)
is resumed. Depending on how Kermit has been built switches may be
available to require a secure authentication method and bidirectional
encryption. Normal switches are:
Updates the modification time of the given file or files to the current
date and time or to the date and time specified in the /MODTIME: switch.
If the filespec is the name of a single file that does not exist, the file
is created. The following switches can be used to restrict the files
to be touched according to various criteria:
Factory defaults are marked with +. Use HELP DATE to learn the date-time
formats usable with /MODTIME:. If a /MODTIME: switch is not given, each
selected file gets a modification time equal to the current clock time.
You can use the /SIMULATE switch in combination with other switches to see
which files will be affected without actually changing their dates.
When C-Kermit is connected to another computer, TRANSMIT sends the contents
of a file, without any error checking or correction, to the computer on the
other end of your communications connection (or if C-Kermit is in remote
mode, displays it on the screen). The filename is the name of a single file
(no wildcards) to be sent. The file is sent according to your current FILE
TYPE setting (BINARY or TEXT), which you can override with a /BINARY or
/TEXT switch without disturbing the global setting. There can be no
guarantee that the other computer will receive the file correctly and
completely. Before you start the TRANSMIT command, you must put the other
computer in data collection mode, for example by starting a text editor.
TRANSMIT may be interrupted by Ctrl-C. Synonym: XMIT. See HELP SET
TRANSMIT for further information. Switches:
Undefines and removes the named variable or macro that was created
by the DEFINE command.
Like ECHO but doesn't print anything; can be used to invoke functions
when you don't need to display or use their results.
WHILE loop. Execute the commands in the bracketed
commandlist while the condition is true. Conditions are the same as for
IF command.
For debugging Kermit scripts.
Like MESSAGE, except does not include a line
terminator at the end. Prints the given text to STDOUT if SET DEBUG MESSAGE
is ON; prints it to stderr if SET DEBUG MESSAGE is STDERR; doesn't print it
at all if SET DEBUG MESSAGE is OFF.
To force a special pattern character to be taken literally, precede it with
a backslash, e.g. [a\-z] matches a, hyphen, or z rather than a through z.
A floating pattern can also include the following special characters:
You can use anchored patterns not only in filenames, but also in
SWITCH case labels, in the INPUT
and MINPUT commands,
and in file binary- and text-patterns for filenames. The
IF MATCH pattern is also anchored.
An S-Expression is always enclosed in parentheses, which can
contain (a) a number, (b) a variable, (c) a function
that returns a number, or (d) an operator followed by one or more
operands. Operands can be any of
(a)-through-(c) or an S-Expression. Numbers can be integers or
floating-point. Any operand that is not a number and does not start with
backslash (\) is treated as a variable that would have to be written as
\m(name) outside of S-Expressions. Operators:
The built-in constants are:
ON (the default) enables ringing of the terminal bell (beep) except where
it is disabled in certain circumstances, e.g. by SET TRANSFER BELL. OFF
disables ringing of the bell in all circumstances, overriding any specific
SET xxx BELL selections.
Type 1 is standard and supported by all Kermit protocol implementations,
but it's only a 6-bit checksum, represented in a single printable ASCII
character. It's fine for reliable connections (error-correcting modems,
TCP/IP, etc) but type 3 is recommended for connections where errors can
occur.
Type 2 is a 12-bit checksum represented in two printable characters.
Type 3 is a 16-bit cyclic redundancy check, the strongest error
detection method supported by Kermit protocol, represented in three
printable characters.
Type 4 (alias "BLANK-FREE-2") is a 12-bit checksum guaranteed to
contain no blanks in its representation; this is needed for connections
where trailing blanks are stripped from incoming lines of text.
Type 5 (alias "FORCE-3") means to force a Type 3 block check on
every packet, including the first packet, which normally has a type 1
block check. This is for use in critical applications on noisy
connections. As with types 2, 3, and 4, if the Kermit file
transfer partner does not support this type, the transfer fails
immediately at the beginning of the transfer.
code is the numeric ASCII code for a control character 1-31,127-159,255.
The word "ALL" means all characters in this range.
PREFIXED code means the given control character must be converted to a
printable character and prefixed, the default for all control characters.
UNPREFIXED code means you think it is safe to send the given control
character as-is, without a prefix. USE THIS OPTION AT YOUR OWN RISK!
SHOW CONTROL to see current settings. SET CONTROL PREFIXED ALL is
recommended for safety. You can include multiple code values in one
command, separated by spaces.
If you have not already set your DIAL INTL-PREFIX and LD-PREFIX, then this
command sets default values for them: 011 and 1, respectively, for country
code 1; 00 and 0, respectively, for all other country codes. If these are
not your true international and long-distance dialing prefixes, then you
should follow this command by DIAL INTL-PREFIX and LD-PREFIX to let Kermit
know what they really are.
In this command, you can also specify the escape character as ^X (circumflex
followed by a letter or one of: @, ^, _, [, \, or ], to indicate a control
character; for example, SET ESC ^_ sets your escape character to
Ctrl-Underscore.
You can also specify an 8-bit character (128-255) as your escape character,
either by typing it literally or by entering its numeric code but don't do
this unless you're sure you know how to type it!
Syntax: SET EXIT MESSAGE { ON, OFF, STDERR }
Syntax: SET EXIT ON-DISCONNECT { ON, OFF }
Syntax: SET EXIT STATUS number
Syntax: SET EXIT WARNING { ON, OFF, ALWAYS }
When EXIT WARNING is ON, issue a warning message and ask for confirmation
before EXITing if a connection to another computer might still be open.
When EXIT WARNING is ALWAYS, confirmation is always requested. When OFF
it is never requested. The default is ON.
When TRANSFER MODE is AUTOMATIC (as it is in C-Kermit by default), various
automatic methods (depending on the platform) are used to determine whether
a file is transferred in text or binary mode; these methods (which might
include content scan (see SET FILE SCAN above), filename pattern matching
(SET FILE PATTERNS), client/server "kindred-spirit" recognition, or source
file record format) supersede the FILE TYPE setting but can, themselves, be
superseded by including a /BINARY or /TEXT switch in the SEND, GET, or
RECEIVE command.
When TRANSFER MODE is MANUAL, the automatic methods are skipped for sending
files; the FILE TYPE setting is used instead, which can be superseded on a
per-command basis with a /TEXT or /BINARY switch.
LABELED is for VMS block-structured files.
Switches let you associate a particular kind of flow control with each kind
of connection: /REMOTE, /MODEM, /DIRECT-SERIAL, /TCPIP, etc; type
"set flow ?" for a list of available switches. Then whenever you
make a connection, the associated flow-control is chosen automatically. The
flow-control values are NONE, KEEP, XON/XOFF, and possibly RTS/CTS and some
others; again, type "set flow ?" for a list. KEEP tells Kermit not to try
to change the current flow-control method for the connection.
If you omit the switch and simply supply a value, this value becomes the
current flow control type, overriding any default value that might have
been chosen in your most recent SET LINE, SET PORT, or SET HOST, or other
connection-establishment command.
Type SHOW FLOW-CONTROL to see the current defaults for each connection type
as well as the current connection type and flow-control setting. SHOW
COMMUNICATIONS also shows the current flow-control setting.
Establishes a connection to the specified network host on the currently
selected network type. For TCP/IP connections, the default service is
TELNET; specify a different TCP port number or service name to choose a
different service. The first set of switches can be:
Also see SET NETWORK, TELNET, SET TELNET.
In Unix, VMS, and other timesharing systems, Kermit has no access to your
keyboard nor its scancodes, so key mapping is severely restricted to
shifted and unshifted letters, digits, and punctuation, plus control
characters.
In Windows and OS/2 however, Kermit does see the scancodes and
you can map every single key and key combination (e.g. Ctrl-Alt-Shift-F2)
to whatever you want, including any of about 700 different "/Kverbs",
See THIS PAGE for complete information
about Kverbs.
Optional switches:
By default, the Locus for file management commands is switched
automatically whenever you make or close a connection: if you make an
FTP connection, the Locus becomes REMOTE; if you close an FTP connection
or make any other kind of connection, the Locus becomes LOCAL.
If you give a SET LOCUS LOCAL or SET LOCUS REMOTE command, this sets
the locus as indicated and disables automatic switching.
SET LOCUS AUTO restores automatic switching.
The text has exactly the same properties as the text from the
SET KEY command — it can be a character, a string, one or more Kverbs, a
macro invoked as a Kverb, or any combination of these. Thus, anything that
can be assigned to a key can also be assigned to the mouse — and vice
versa. If the text is omitted, the action will be ignored.
Examples:
You can have multiple network directories and you can have multiple entries
with the same name. SET HOST name and TELNET name commands
look up the name in the directory and, if found, fill in the additional
items from the entry, and then try all matching entries until one succeeds.
SHOW PROTOCOL displays the current settings.
Strict host key checking protects you against Trojan horse attacks.
It depends on you to maintain the contents of the known-hosts-file
with current and trusted host keys.
The following TCP and/or IP parameter(s) may also be changed:
Some options are negotiated in two directions and accept separate policies
for each direction; the first keyword after the option applies to
Kermit itself, the second applies to Kermit's Telnet partner; if the second
keyword is omitted, an appropriate (option-specific) default is applied.
You can also include a /CLIENT or /SERVER switch to indicate whether the
given policies apply when Kermit is the Telnet client or the Telnet server;
if no switch is given, the command applies to the client.
Note that some of Kermit's Telnet partners fail to refuse options that
they do not recognize and instead do not respond at all. In this case it
is possible to use SET TELOPT to instruct Kermit to REFUSE the option
before connecting to the problem host, thus skipping the problematic
negotiation.
Use SHOW TELOPT to view current Telnet Option negotiation settings.
SHOW TELNET displays current Telnet settings.
When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting
tells what to do if an error occurs during a file transfer or other
protocol operation initiated by the terminal emulator: STOP (the default)
means to remain in command mode so you can see what happened; CONTINUE
means to resume the CONNECT session (e.g. so a far-end script can continue
its work).
When TERMINAL AUTODOWNLOAD is ON, the TERMINAL AUTODOWNLOAD ERROR setting
tells what to do if an error occurs during a file transfer or other
protocol operation initiated by the terminal emulator: STOP (the default)
means to remain in command mode so you can see what happened; CONTINUE
means to resume the CONNECT session (e.g. so a far-end script can continue
its work).
The text may contain "\Kverbs" to denote actions, to stand for DEC
keypad, function, or editing keys, etc. For a list of available keyboard
verbs, type SHOW KVERBS.
To find out the keycode and mapping for a particular key, use the SHOW
KEY command. Use the SAVE KEYS command to save all settings to a file.
The ON and OFF choices allow you to disable and renable wildcard
processing independent of the KERMIT / SHELL choice. Disabling wildcards
allows you to process an array or list of filenames without having to
consider whether the names might contain literal wildcard characters.
WARNING: SET WILD OFF also disables internal filename pattern-matching,
used (for example) in creating backup files.
On Windows and OS/2 SET KEY and SHOW KEY work with any key or
key combination, e.g. Num Lock, numeric keypad up-arrow, Ctrl-Alt-Shift-F2,
etc.
('
Here is a list of C-Kermit's single-letter command-line options, which start
with a single dash (
Extended command-line options (necessary because single-letter ones are about
used up) start with two dashes (
Tells the other Kermit, which must be in (or support autoswitching into)
server mode, to send the named file or files. If the remote-filespec
or the asname contains spaces, they must be enclosed in doublequotes
or braces. If asname is the name of an existing local directory,
incoming files are placed in that directory; if it is the name of a directory
that does not exist, Kermit tries to create it. If the remote filespec is
wild (i.e. will result in multiple files arriving) the asname must contain
variables such as \v(filename) so each incoming file will be given a
distinct name. Optional switches include:
/EXCEPT:{{pattern1}{pattern2}...}
Example: GETC \%c { Type any character to continue...}
For use in interactive scripts. Prints the prompt text, requires user to
type 'yes', 'no', or 'ok' (these can be abbreviated), and sets SUCCESS or
FAILURE accordingly. Switches:
In a TAKE file or macro, go to (transfer control to) the given label. A
label is a word on the left margin that starts with a colon (:). Example:
:again
echo Hello!
goto again
Synonyms: FIND, SEARCH
Pattern-matching options:
Display options:
Result Disposition options:
Displays the top part of the given file.
Note: this command has a number of switches that it shares with the TYPE
command, but are mostly meaningless in this context.
Synonym: CLOSE CONNECTION
Prints help text for the given command, or certain other topics like
PATTERNS, COMPACT-SUBSTRING, SUPPORT, INTRO, LICENSE, etc.
HTTP [ switches ] POST [ /MIME-TYPE:type ]
localfilename remotepath
[ destinationfile ]
As you can see, the header lines are like MIME e-mail header lines:
identifier, colon, value. The /ARRAY switch is the only method available
to a script to process the server responses for a POST or PUT command.
/HEADER:{{
For a listing of valid
http /array:c get kermit/index.html
show array c
Dimension = 9
1. Date: Fri, 26 Nov 1999 23:12:22 GMT
2. Server: Apache/1.3.4 (Unix)
3. Last-Modified: Mon, 06 Sep 1999 22:35:58 GMT
4. ETag: "bc049-f72-37d441ce"
5. Accept-Ranges: bytes
6. Content-Length: 3954
7. Connection: close
8. Content-Type: text/html
IF EXIST somefile.txt command
The conditions are:
IF ( EXIST somefile.txt || = \v(nday) 3 ) command
IF ( EXIST somefile.txt || = \v(nday) 3 ) { command, command, ... }
SUCCESS
The previous command succeeded
OK
Synonym for SUCCESS
FAILURE
The previous command failed
ERROR
Synonym for FAILURE
FLAG
Succeeds if SET FLAG ON, fails if SET FLAG OFF
BACKGROUND
C-Kermit is running in the background
FOREGROUND
C-Kermit is running in the foreground
REMOTE-ONLY
C-Kermit was started with the -R command-line option
KERBANG
A Kerbang script is running
ALARM
SET ALARM time has passed
ASKTIMEOUT
The most recent ASK, ASKQ, GETC, or GETOK timed out
EMULATION
Succeeds if executed while in CONNECT mode
MS-KERMIT
Program is MS-DOS Kermit
C-KERMIT
Program is C-Kermit
WINDOWS
Program is C-Kermit on Windows
GUI
Program runs in a GUI window
AVAILABLE CRYPTO
Encryption is available
AVAILABLE KERBEROS4
Kerberos 4 authentication is available
AVAILABLE KERBEROS5
Kerberos 5 authentication is available
AVAILABLE NTLM
NTLM authentication is available
AVAILABLE SRP
SRP authentication is available
AVAILABLE SSL
SSL/TLS authentication is available
MATCH string pattern
Succeeds if string matches pattern
FLOAT number
Succeeds if floating-point number
COMMAND word
Succeeds if word is built-in command
DEFINED variablename or macroname
The named variable or macro is defined
DECLARED arrayname
The named array is declared
NUMERIC variable or constant
The variable or constant is numeric
FUNCTION name
The name is of a built-in function
EXIST filename
The named file exists
ABSOLUTE filename
The filename is absolute, not relative
BINARY filename
The file is a binary regular file
TEXT filename
The file is a text regular file
DIRECTORY string
The string is the name of a directory
LINK string
The string is a symbolic link
READABLE filename
Succeeds if the file is readable
WRITEABLE filename
Succeeds if the file is writeable
NEWER file1 file2
The 1st file is newer than the 2nd one
OPEN { symbolicfilename* }
The given file or log is open
OPEN CONNECTION
A connection is open
KBHIT
A key has been pressed
TRUE
always succeeds
FALSE
always fails
VERSION
equivalent to "if >= \v(version) ..."
EQUAL s1 s2
s1 and s2 (character strings or variables) are equal
LLT s1 s2
s1 is lexically (alphabetically) less than s2
LLE s1 s2
s1 is lexically less than or equal to s2
LGT s1 s2
s1 is lexically (alphabetically) greater than s2
LGE s1 s2
s1 is lexically greater than or equal to s2
NEQ s1 s2
s1 is not equal to s2
= n1 n2
n1 and n2 (numbers or variables containing numbers) are equal
< n1 n2
n1 is arithmetically less than n2
<= n1 n2
n1 is arithmetically less than or equal to n2
> n1 n2
n1 is arithmetically greater than n2
>= n1 n2
n1 is arithmetically greater than or equal to n2
!= n1 n2
n1 is not equal to n2
(number by itself)
fails if the number is 0, succeeds otherwise
(variable name)
If value numeric: succeeds if nonzero, fails if zero
NOTE: variable name must not be the same as keyword
*
Symbolic filenames:
connection error screen write-file
cx-log packet-log session-log
debug-log read-file transaction-log
IF < \%x 10 ECHO It's less
ELSE echo It's not less
It can also include an ELSE part on the same line if braces are used:
IF < \%x 10 { ECHO It's less } ELSE { ECHO It's not less }
Multiple commands can be enclosed in braces, separated by commas:
IF > \%n \m(max) { echo \%n > old max \m(max), .max := \%n }
When braces are used the command may split onto multiple lines:
IF > \%n \m(max) {
echo "\%n greater than old max \m(max)"
.max := \%n
} else if < \%n \m(min) {
echo "\%n less than old min \m(min)"
.min := \%n
}
Increment (add one to) the value of a variable if the current value is
numeric. If an optional amount is specified (as a number, a variable, or an
arithmetic expression that evaluates to a number, or any combination) the
variable is incremented by that number instead of 1. The result is always
an integer. If floating-point numbers are given, the result is truncated.
Examples:
INCR \%a, INCR dollars 100, INCR size \%n, INCR total \%x/10
Examples:
INPUT 5 Login:
INPUT 23:59:59 RING
INPUT /NOMATCH 10
INPUT /CLEAR 10 \13\10
INPUT /CLEAR 10 \13\10$
INPUT /COUNT:256 10
INPUT 10 \fpattern(<*@*.*>)
Waits up to the given number of seconds, or until the given time of day,
for the given text to arrive on the connection. For use in script programs
with IF FAILURE or IF SUCCESS, which tell whether the desired text arrived
within the given amount of time.
INPUT 10 login:
IF FAIL EXIT 1 "Timed out waiting for login prompt"
LINEOUT myuserid
INPUT 10 Password:
IF FAIL EXIT 1 "Timed out waiting for Password prompt"
LINEOUT xxxxxxx
The /NOWRAP switch means that INPUT should return with failure status
and with \v(instatus) set to 6 if its internal buffer fills up before
any of the other completion criteria are met. This allows for capture
of the complete incoming data stream (except NUL bytes, which are
discarded). CAUTION: if the search target (if any) spans the INPUT buffer
boundary, INPUT will not succeed.
download
Your download directory (if any)
exedir
The directory where the Kermit executable resides
home
Your home, login, or default directory
inidir
The directory where Kermit's initialization file was found
lockdir
The UNIX UUCP lockfile directory on this computer
startup
Your current directory at the time Kermit started
textdir
The directory where Kermit text files reside, if any
tmpdir
Your temporary directory
Transmits the text to the computer C-Kermit is currently connected to as a
"line", meaning Kermit supplied the appropriate line terminator (carriage
return and/or linefeed). Handy for automating interactive transactions
with a remote host (such as logging in), used in conjunction with
the INPUT command.
Also see OUTPUT.
Record information in a log file:
If you include the APPEND keyword after the filename the existing log file,
if any, is appended to; otherwise a new file is created (except APPEND is
the default for the connection log). Use CLOSE keyword to stop logging.
Note: The filename can also be a pipe, e.g.:
log transactions |lpr
log debug {| grep "^TELNET" > debug.log}
Braces are required if the pipeline or filename contains spaces.
Equivalent to SEND /MAIL:address filename, sends the file to be
delivered as email to the given address, using the computer's email client.
For debugging Kermit scripts. Prints the given text to stdout if SET DEBUG
MESSAGE is ON; prints it to stderr if SET DEBUG MESSAGE is STDERR
Syntax: MINPUT [ switches ] n [ string1 [ string2 [ ... ] ] ]
Example: MINPUT 5 Login: {Username: } {NO CARRIER} BUSY RING
Sends the files specified by the filespecs. One or more filespecs may be
listed, separated by spaces. Any or all filespecs may contain wildcards and
they may be in different directories. Alternative names for the received
files cannot be given. Switches include /BINARY /DELETE /MAIL /PROTOCOL
/QUIET /RECOVER /TEXT /TYPE; see SEND for descriptions.
Example: MPAUSE 500
Sleep, i.e. do nothing, for the specified number of milliseconds; if no
number given, 100 milliseconds. Synonym: MSLEEP.
Synonym for MPAUSE.
OPEN READ somefile.txt
OPEN !READ sort foo.bar
The newer FILE interface (FOPEN, FCLOSE, FREAD, etc)
is less limited and more powerful and flexible.
Also see SET OUTPUT.
\N
Send a NUL (ASCII 0) character (you can't use \0 for this).
\B
Send a BREAK signal (serial-port connections only)
\L
Send a Long BREAK signal (ditto).
Example 1: PAUSE 3
Example 2: PAUSE 14:52:30
Partially dials a phone number. Like DIAL but does not wait for carrier
or CONNECT message.
pipe rlogin xyzcorp.com
Use SET OPTIONS PURGE [ switches ] to change defaults; use SHOW
OPTIONS to display customized defaults. Also see HELP DELETE, HELP
WILDCARD.
/EXCEPT:{{pattern1}{pattern2}...}
Gives the command to the local operating system's command processor, and
displays the results on the screen. If the command is omitted, enters the
system's command line interpreter or shell; exit from it (the command for
this is usually EXIT or QUIT or LOGOUT) to return to Kermit.
Print Working Directory:
prints the name of C-Kermit's current working directory.
Exits from the Kermit program, closing all open files and devices.
If a number is given it becomes Kermit's exit status code. If text is
included, it is printed. Also see SET EXIT.
Reads a line from the currently open READ or !READ file into the variable
(see OPEN).
Normally these days, if you are connected from C-Kermit to another computer
and you tell its Kermit program to send a file, C-Kermit receives it
automatically without your having to do anything else (such as "escape back"
to the C-Kermit prompt and give a RECEIVE command and then another CONNECT
command once the transfer is finished). So the following applies only if you
have told C-Kermit to SET TERMINAL AUTODOWNLOAD OFF, in which case after
giving the SEND command to the remote computer, you have type C-Kermit's
escape sequence, which is normally Ctrl-\ (Control-Backslash) followed by
the letter C. In other words, you'll never need to use the RECEIVE
command in C-Kermit unless you require any of the following.
If multiple files are to arrive and you want to rename them on the fly, the
asname must contain variables such as \v(filename) so each incoming file
will be given a distinct name. Optional switches include:
Also see SEND, GET.
/EXCEPT:{{*.exe}{*.o}{*.xls}}
Synonym: < (Left angle bracket).
Synonym: ^xxx
Re-executes the most recent command starting with xxx.
This is a relic from the times before C-Kermit could figure out on its
own, when sending a file, whether it was text (and therefore needed
record-format conversion) or binary (which must be sent without any
kind of conversions).
Removes the pattern(s), if any, from the SET FILE BINARY-PATTERNS list
Removes the given patterns from the SET FILE TEXT-PATTERNS list.
Use SHOW PATTERNS to see the lists. See HELP SET FILE for further info.
For more about C-Kermit's RENAME command CLICK
HERE.
If LOCUS is REMOTE or LOCUS is AUTO and you have an
FTP connection, this command is equivalent to REMOTE RENAME (RREN).
Otherwise, read on...
Syntax:
RENAME or MOVE or MV
[ switches ] name1 [ name2 ]
When any of the following switches is given, name2 must either be the
the name of a directory, or else omitted, and name1 is allowed to contain
contain wildcards, allowing multiple files to be renamed at once. If name2
is given, then all files matching name1 are moved to the name2 directory
after being renamed.
Global values for /LIST and COLLISION can be set with SET RENAME and
displayed with SHOW RENAME.
A
String matching is case-sensitive.
a
String matching is case-insensitive.
^
String matching is anchored to the beginning of the filename.
$
String matching is anchored to the end of the filename.
1
Only the first occurrence of the string (if any) will be changed.
2
Only the second occurrence, and so on for all digits up to 9.
-
(before a digit) Occurrences are counted from the right.
~
(before occurrence) All occurences BUT the one given are changed.
For use inside a macro definition: returns from the macro to its caller. An
optional return value can be given for use with
\fexecute(macroname,args), which allows macros to be used like
functions.
Equivalent to SET NETWORK TYPE TCP/IP,
SET HOST host [ service ] /RLOGIN,
IF SUCCESS CONNECT. If host is omitted, the previous connection (if any)
is resumed. Depending on how Kermit has been built switches may be
available for Kerberos authentication and DES encryption.
Removes the named directory, which must be empty. Wildcards not permitted.
Passes the command to the local operating system's command processor, and
displays the results on the screen. If the command is omitted, enters the
system's command line interpreter or shell; exit from it (the command for
this is usually EXIT or QUIT or LOGOUT) to return to Kermit.
Performs screen-formatting actions. Correct operation of these commands
depends on proper terminal setup on both ends of the connection:
A limited and cryptic "login assistant", carried over from 1980s C-Kermit
releases for comptability. Handy for those who know UUCP scripting because
it's based on that. It's indended primarily for
login to a remote computer using the text provided. The login script
operates like UNIX uucp "L.sys" entries.
A login script is a sequence of the form:
expect send [expect send] . . .
where 'expect' is a prompt or message to be issued by the remote site, and
'send' is the names, numbers, etc, to return. The send may also be the
keyword EOT to send Control-D, or BREAK (or \\b) to send a break signal.
Letters in send may be prefixed by ~ to send special characters:
-send-expect[-send-expect[...]]
where dashed sequences are followed as long as previous expects fail.
Synonyms: S, PUT
/EXCEPT:{{pattern1}{pattern2}...}
More about patterns HERE.
Sends a "file" of the given length for the purpose of calibration. The
file is not on disk; it is generated on the fly by Kermit in a way that is
almost impossible to compress. Thus the speed of the transfer is
independent of disk accesses or of compression. When the /CALIBRATE is
given, you omit the file specification; SEND /CALIBRATE by itself is
sufficient. Of course other SEND switches can be used as well. Ideally the
other Kermit should be told to RECEIVE /CALIBRATE (if it supports this
feature), so it won't store the incoming file to disk. A typical use for
calibration transfers is benchmarking of different computers and/or network
connections, or testing the effect of various settings like packet length,
sliding window size, streaming, etc. After the transfer, give the
STATISTICS /VERBOSE command to see the statistics.
Also see RECEIVE.
Synonym: PAUSE
Key Type
Private Key File
Public Key File
RSA keys \v(home).ssh/id_rsa \v(home).ssh/id_rsa.pub
DSA keys \v(home).ssh/id_dsa \v(home).ssh/id_dsa.pub
ECDSA keys \v(home).ssh/id_ecdsa \v(home).ssh/id_ecdsa.pub
ED25519 keys \v(home).ssh/id_ed25519 \v(home).ssh/id_ed25519.pub
ECDSA: 256 (default), 384, 521
ED25519 does not support being given a key length and any value supplied
via /BITS: will be ignored.
RSA: 1024, 2048, 3072 (default), 4096, 8192
DSS: 1024 (default), 2048
/PASSWORD:password /VERSION:{ 1, 2 }
/X11-FORWARDING:{ ON, OFF } ]
SSH OPEN hostname /COMMAND:{kermit -x -l 0}
Display statistics about most recent file transfer.
Synonym: Z
:x, command, command, ..., break
where "x" is a possible value for the variable. At the end of the
case-list, you can put a "default" label to catch when the variable does
not match any of the labels:
:default, command, command, ...
The case label "x" can be a character, a string, a variable, a function
invocation, a pattern, or any combination of these. See
PATTERNS for information about patterns.
/FILES
Select files but not directories.
/DIRECTORIES
Select directories but not files.
/ALL
+
Select both files and directories.
/AFTER:
Select files modified after the given date
/BEFORE:
Select files modified before the given date
/LARGER:
Select files larger than the given size in bytes
/SMALLER:
Select files smaller than the given size in bytes
/EXCEPT:
Exclude the given files (list or pattern)
/DOTFILES
Include files whose names start with dot (period).
/NODOTFILES
+
Don't include files whose names start with dot.
/FOLLOWLINKS
For symbolic link touch the linked-to file, not the link
/NOFOLLOWLINKS
+
Select the link itself, not the file it links to.
/NOLINKS
Skip over symbolic links.
/BACKUP
+
Include backup files (names end with .~n~).
/NOBACKUPFILES
Don't include backup files.
/TYPE:
Select only files of the given type, TEXT or BINARY.
/RECURSIVE
Descend through subdirectories.
/NORECURSIVE
+
Don't descend through subdirectories.
/MODTIME:
Changes the modification time for the selected files.
in numeric yyyy:mm:dd:hh:mm:ss format.
if hh:mm:ss omitted time is set to 00:00:00
/SIMULATE
List files that would be touched, but don't touch them.
/LIST
Show which files are being touched.
For debugging Kermit scripts:
turns tracing of the given object on or off. The default object is ALL.
Synonym for CONVERT:
Converts the character encoding of a file to a different encoding.
Synonym: XMIT
Displays a file on the screen. Pauses automatically at end of each
screenful if COMMAND MORE-PROMPTING is ON (which is the default). Optional
switches:
You can use SET OPTIONS TYPE to set the defaults for /PAGE or /NOPAGE and
/WIDTH. Use SHOW OPTIONS to see current TYPE options.
Synonym for ARRAY UNDECLARE:
un-declares and destroys an array.
Example: UNDEFINE autologin
Examples:
wait 5 cd cts
wait 23:59:59 cd
Waits up to the given number of seconds or the given time of day for the
specified item or event, which can be FILE, the name(s) of one or more
modem signals, or nothing. If nothing is specified, WAIT acts like SLEEP.
If one or more modem signal names are given, Kermit waits for the
specified modem signals to appear on the serial communication device.
Sets FAILURE if the signals do not appear in the given time or interrupted
from the keyboard during the waiting period.
If you want Kermit to wait for a file event, then the syntax is:
cd
Carrier Detect
ds
Dataset Ready
ct
Clear To Send
ri
Ring Indicator
WAIT time FILE { CREATION, DELETION, MODIFICATION } filename
where time is as above, and filename is the name of a single
file. Kermit waits up to the given amount of time for the specified event
to occur with the specified file, succeeds if it occurs, fails if it doesn't.
For multiuser timesharing systems:
runs an external program that shows current logged-in users (userid, terminal,
time, host of origin). If a user is specified, then the same
information for only that user.
Writes the given text to the named object (log or file). The text text may
include backslash codes, and is not terminated by a newline unless you
include the appropriate code. The object parameter can be any of the
following:
DEBUG-LOG
ERROR (i.e. STDERR)
FILE (the OPEN WRITE, OPEN !WRITE, or OPEN APPEND file, see HELP OPEN)
PACKET-LOG
SCREEN (compare with ECHO)
SESSION-LOG
TRANSACTION-LOG
Just like ECHO (prints the text on your screen)
but does not add a line terminator to the text.
Synonym: XMSG.
User-defined variables
For script programming, C-Kermit has a group of commands for defining,
manipulating, and undefining variables, which are described above:
DEFINE/_DEFINE,
UNDEFINE/_UNDEFINE,
ASSIGN/_ASSIGN,
EVALUATE/_EVALUATE,
INCREMENT/_INCREMENT,
DECREMENT/_DECREMENT,
and
EVALUATE/_EVALUATE.
Each one takes a variable name as the first argument and the variable's
value as the second. The ones that start with underscore (_) evaluate the
variable name before doing their jobs, and the ones without the underscores
take it literally. For some of these there is also a shorthand notation:
Note that the shorthand notation always starts with a period (.) followed
immediately by the variable name ('x' in these examples), and the =,
:=, or ::= operator requires at least one space before and after.
.x = value
Equivalent to "define x value"
value is taken literally
.x := value
Equivalent to "assign x value"
value any/all variables in the value are evaluated
.x ::= value
Equivalent to "evaluate x value"
The value is evaluated as a mathematical expression
Tokens
Tokens are single non-alphanumeric characters that are significant
in C-Kermit commands; those marked with '+' are effective only as the
first nonblank character in the command.
Those marked with '*' must be either the first character of the command or
else prececed by at least one space.
?
Lists the possibilities at the current spot in the commmand
!
Executes a command on the underlying operating system
@
Executes a command on the underlying operating system
<
Like !
but sends result out out the communications connection
#
*
Introduces a comment
;
*
Also introduces a comment
(
+
Introduces an S-Expression
:
+
Introduces a label
.
+
Introduces a variable assignment
^
+
Introduces a backwards search through command history[1].
{
+
Introduces a braced list of commands[2]
Patterns
"Pattern" refers to the notation used in a search string. C-Kermit uses
patterns in many contexts, most notably when parsing a file specification
that might match more than one file, e.g.
send {makefile,ck[cu]*.[cwh]}
There are two kinds of patterns: floating and anchored.
Wildcards are anchored patterns that are used to match file names.
NOTATION
FUNCTION
*
Matches any sequence of zero or more characters. For example, "k*t"
matches all strings that start with "k" and end with "t" including
"kt", "kit", "knight", and "kermit".
?
Matches any single character. For example, "k????t" matches all strings
that are exactly 6 characters long and start with "k" and end with
with "t". When typing commands at the prompt, you must precede any
question mark to be used for matching by a backslash (\) to override the
normal function of question mark in interactive commands, which is to
provide menus and file lists.
[abc]
Square brackets enclosing a list of characters matches any character in
the list. Example: h[aou]t matches hat, hot, and hut.
[a-z]
Square brackets enclosing a range of characters matches any character in
the range; a hyphen (-) separates the low and high elements of the range.
For example, [a-z] matches any character from a to z.
[acdm-z]
Lists and ranges may be combined. This example matches a, c, d, or any
letter from m through z.
{string1,string2,...}
Braces enclose a list of strings to be matched. For example:
"ker{mit,nel,beros}" matches kermit, kernel, and kerberos. The strings
may themselves contain *, ?, [abc], [a-z], or other lists of strings.
If a floating pattern does not start with "^", the pattern can match
anywhere in the string instead of only at the beginning; in other words, a
leading "*" is assumed. Similarly, if the pattern doesn't end with "$",
a trailing "*" is assumed.
^
(First character of pattern) Anchors the pattern at the beginning.
$
(Last character of pattern) Anchors the pattern at the end.
All other commands and functions use anchored patterns, meaning that ^ and $
are not treated specially, and * is not assumed at the beginning or end of
the pattern. This is true mainly of filename patterns (wildcards), since
you would not want a command like "delete x" to delete all files whose
names contained "x"!
TYPE /MATCH:pattern file
\farraylook(pattern,arrayname)
\fsearch(pattern,string[,offset])
\frsearch(pattern,string[,offset])
The /EXCEPT: clause in SEND, GET, DELETE, etc.
\fsearch(^abc,xxabcxx) fails because xxabcxx does not start with abc.
LISP S-expressions
Since version 8.0, C-Kermit has included a simple LISP-like S-Expression
parser operating on numbers only. It is especially handy for
floating-point arithmetic, which was notably unwieldy in earlier
C-Kermit releases. S-Expressions are thoroughly documented
in the C-Kermit 8.0 release notes.
Predicate operators return 0 if false, 1 if true, and if it is the outermost
operator, sets SUCCESS or FAILURE accordingly:
Operator
Action
Example
Value
EVAL (.)
Returns the contained value
(6)
6
QUOTE (')
Inhibits evaluation of following value
(quote a)
a
SETQ
Assigns a value to a global variable
(setq a 2)
2
LET
Assigns a value to a local variable
(let b -1.3)
-1.3
+
Adds all operands (1 or more)
(+ a b)
0.7
-
Subtracts all operands (1 or more)
(- 9 5 2 1)
1
*
Multiplies all operands (1 or more)
(* a (+ b 1) 3)
-1.8
/
Divides all operands (1 or more)
(/ b a 2)
-0.325
^
Raise given number to given power
(^ 3 2)
9
++
Increments a variable
(++ a 1.2)
3.2
--
Decrements a variable
(-- a)
1
ABS
Absolute value of 1 operand
(abs (* a b 3))
7.8
MAX
Maximum of all operands (1 or more)
(max 1 2 3 4)
4
MIN
Minimum of all operands (1 or more)
(min 1 2 3 4)
1
MOD
Modulus of all operands (1 or more)
(mod 7 4 2)
1
TRUNCATE
Integer part of floating-point operand
(truncate 1.333)
1
CEILING
Ceiling of floating-point operand
(ceiling 1.25)
2
FLOOR
Floor of floating-point operand
(floor 1.25)
1
ROUND
Operand rounded to nearest integer
(round 1.75)
2
ROUND
...or to given number of decimals
(round 1.7584 2)
1.76
SQRT
Square root of 1 operand
(sqrt 2)
1.414..
EXP
e (2.71828..) to the given power
(exp -1)
0.367..
SIN
Sine of angle expressed in radians
(sin (/ pi 2))
1.0
COS
Cosine of given number
(cos pi)
-1.0
TAN
Tangent of given number
(tan pi)
0.0
LOG
Natural log (base e) of given number
(log 2.7183)
1.000..
LOG10
Log base 10 of given number
(log10 1000)
3.0
Bit-oriented operators:
Operator
Meaning
Example
Result
<
Operands in strictly descending order
(< 6 5 4 3 2 1)
1
<=
Operands in descending order
(<= 6 6 5 4 3 2)
1
!=
Operands are not equal
(!= 1 1 1.0)
0
= (==)
All operands are equal
(= 3 3 3 3)
1
>
Operands in strictly ascending order
(> 1 2 3 4 5 6)
1
>=
Operands in ascending order
(>= 1 1 2 3 4 5)
1
AND (&&)
Operands are all true (nonzero)
(and 1 1 1 1 0)
0
OR (||)
At least one operand is true
(or 1 1 1 1 0)
1
XOR
Logical Exclusive OR
(xor 3 1)
0
NOT (!)
Reverses truth value of operand
(not 3)
0
Operators that work on truth values:
Operator
Meaning
Example
Result
&
Bitwise AND (& 7 2)
2
|
Bitwise OR (| 1 2 3 4)
7
#
Bitwise Exclusive OR (# 3 1)
2
~
Reverses all bits (~ 3)
-4
Operators can also be names of Kermit macros that return either numeric
values or no value at all.
Operator
Function
Example
Result
IF
Conditional evaluation
(if (1) 2 3)
2
If SET SEXPRESSION TRUNCATE-ALL-RESULTS is ON, all results are trunctated
to integer values by discarding any fractional part. Otherwise results
are floating-point if there fractional part and integer otherwise.
If SET SEXPRESSION ECHO-RESULT is AUTO (the default), the value of the
S-Expression is printed if the S-Expression is given at top level; if ON,
it is printed at any level; if OFF it is not printed. At all levels, the
variable \v(sexpression) is set to the most recent S-Expression, and
\v(svalue) is set to its value. You can use the \fsexpresssion() function
to evaluate an S-Expression anywhere in a Kermit command.
Constant
Meaning
t
True (1)
nil
False (empty)
pi
The value of π (3.1415926...)
The SET command
Number of seconds from now, or time of day, after which IF ALARM
will succeed. 0, or no time at all, means no alarm.
For use with ASK, ASKQ, GETOK, and GETC. If ASK-TIMER is set to a number
greater than 0, these commands will time out after the given number of
seconds with no response. This command is "sticky", so to revert to
untimed ASKs after a timed one, use SET ASK-TIMER 0. Also see IF ASKTIMEOUT.
For file transfer:
use this command to enable (ON) or disable (OFF) the transmission of
selected file attributes along with each file, and to handle or ignore
selected incoming file attributes, including:
You can also specify ALL to select all of them. Examples:
Attribute
Description
CHARACTER-SET
The transfer character set for text files
DATE
The file's creation or modification date
DISPOSITION
Unusual things to do with the file, like MAIL or PRINT
LENGTH
The file's length
PROTECTION
The file's protection (permissions)
SYSTEM-ID
Machine/Operating system of origin
TYPE
The file's type (text or binary)
SET ATTR DATE OFF
SET ATTR LENGTH ON
SET ATTR ALL OFF
Also see SET SEND and SET RECEIVE.
SET BACKGROUND OFF forces prompts and messages to appear on your screen
even though Kermit thinks it is running in the background.
ON (the default) enables ringing of the terminal bell (beep) except where
it is disabled in certain circumstances, e.g. by SET TRANSFER BELL. OFF
disables ringing of the bell in all circumstances, overriding any specific
SET xxx BELL selections.
Specifies how incoming Ctrl-G (bell) characters are handled in CONNECT
mode and how command warnings are presented in command mode. AUDIBLE
means either a beep or a system-sound is generated; VISIBLE means the
screen is flashed momentarily.
Type of block check to be used for error detection on file-transfer
packets: 1, 2, 3, 4, or 5. This command must be given to the file
sender prior to the transfer.
Specifies the name of your preferred browser plus any command-line
options. SHOW BROWSER displays it. In Unix-based OS shell sessions,
"set browser lynx" is a good bet.
Changes the overall amount of memory allocated for SEND and RECEIVE packet
buffers, respectively. Bigger numbers let you have longer packets and
more window slots. If n2 is omitted, the same value as n1
is used. NOTE: This command is not needed in C-Kermit 9.0 or later, which is
already configured for maximum-size packet buffers.
Attempts to control treatment of carrier (the Data Carrier Detect signal) on
serial communication (SET LINE or SET PORT) devices. ON means that carrier
is required at all times. OFF means carrier is never required. AUTO (the
default) means carrier is required at all times except during the dialing.
Correct operation of carrier-watch depends on the capabilities of the
underlying OS, drivers, devices, and cables and connectors. If you need to
CONNECT to a serial device that is not asserting carrier, and Kermit won't
let you, use SET CARRIER-WATCH OFF. Use SHOW COMMUNICATIONS to display the
CARRIER-WATCH setting.
Tells whether alphabetic case is significant in string comparisons
done by INPUT, IF, and other commands. This setting is local to the
current macro or command file, and inherited by subordinates.
Type SHOW CD to view current CD settings. Also see HELP SET SERVER.
set cd path :directory:directory:...
in other words, a list of directories separated by colons, with a colon
at the beginning, e.g.:
set cd path :/usr/olga:/usr/ivan/public:/tmp
SET CD MESSAGE FILE {{name1}{name2}...{name8}}
Specify up to 8 filenames to look for when when CDing to a new directory
and CD MESSAGE is ON. The first one found, if any, in the new directory
is displayed. The default list is:
{{./.readme}{README.TXT}{READ.ME}}
Tells Kermit whether its connection is transparent to all 8-bit bytes.
Default is AUTO, meaning Kermit guesses from the connection type. When both
sender and receiver agree the channel is clear, SET PREFIXING NONE is used
automatically, which improves file-transfer speeds significantly, especially
for binary files and non-ASCII text files.
Use SHOW COMMAND to display these settings.
When C-Kermit transfers files over a transmission channel of unknown
quality, it encodes control characters as two-printable-character
sequences for safety. But if you happen to know exactly which control
characters are causing problems, you can use this command to arrange that
all the other ones are send "bare":
Example: SET COUNT 5
The original, primitive way for C-Kermit to handle loops. It still works, but
for sanity please use the FOR and
WHILE commands for looping. SET COUNT sets up a loop
counter, for use with IF COUNT. Local to the current macro or command file,
inherited by subordinate macros and command files.
Number of seconds to wait before sending first packet after SEND command.
Not necessary with modern Kermits, which automatically change from terminal
mode to file-transfer mode when a Kermit packet arrives.
The following commands apply only to portable-format numbers obtained from
the dialing directory; i.e. numbers that start with a "+" sign and
country code, followed by area code in parentheses, followed by the phone
number.
Whether to close and release a SET LINE device automatically upon
disconnection; OFF = keep device open (default); ON = close and release.
Applies to terminal connection: FULL means remote host echoes, HALF means
Kermit has to do its own echoing.
Specifies the name of your preferred editor, plus any command-line
options. SHOW EDITOR displays it.
Decimal ASCII value for escape character during CONNECT, normally 28
(Control-\), but 29 (Control-]) in Windows and OS/2.
Type the escape character followed by C to get back to the
C-Kermit prompt or followed by ? to see other options.
When ON (which is the default), C-Kermit executes an implicit HANGUP and
CLOSE command on the communications device or connection when it exits.
When OFF, Kermit skips this sequence.
Allows the text (if any) from an EXIT command (see HELP EXIT) to be
supressed (OFF), printed normally (ON, the default), or sent to STDERR.
When ON, C-Kermit EXITs automatically when a network connection
is terminated either by the host or by issuing a HANGUP command.
Set C-Kermit's program return code to the given number, which can be a
constant, variable, function result, or arithmetic expression.
(research needed)
Normally 8. If 7, Kermit truncates the 8th bit of all file bytes
when sending a file.
Tells the encoding of the local text file, ASCII by default.
The names ITALIAN, PORTUGUESE, NORWEGIAN, etc, refer to 7-bit ISO-646
national character sets. LATIN1 is the 8-bit ISO 8859-1 Latin Alphabet 1
for Western European languages. NEXT is the 8-bit character set of the NeXT
workstation. The CPnnn sets are for PCs. MACINTOSH-LATIN is for the
Macintosh. LATIN2 is ISO 8859-2 for Eastern European languages that are
written with Roman letters. Mazovia is a PC code page used in Poland.
KOI-CYRILLIC, CYRILLIC-ISO, and CP866 are 8-bit Cyrillic character sets.
SHORT-KOI is a 7-bit ASCII coding for Cyrillic. BULGARIA-PC is a PC code
page used in Bulgaria HEBREW-ISO is ISO 8859-8 Latin/Hebrew. CP862 is the
Hebrew PC code page. HEBREW-7 is like ASCII with the lowercase letters
replaced by Hebrew. GREEK-ISO is ISO 8859-7 Latin/Greek. CP869 is the
Greek PC code page. ELOT-927 is like ASCII with the lowercase letters
replaced by Greek. JAPANESE-EUC, JIS7-KANJI, DEC-KANJI, and SHIFT-JIS-KANJI
are Japanese Kanji character sets. UCS-2 is the 2-byte form of the
Universal Character Set. UTF-8 is the serialized form of the Universal
Character Set. Type SET FILE CHAR ? for a complete list of file character
sets.
CLICK HERE to see all the possibilities.
Tells what to do when a file arrives that has the same name as
an existing file. The options are:
BACKUP
(default) Rename the old file to a new, unique name and store
the incoming file under the name it was sent with.
OVERWRITE
Overwrite (replace) the existing file; doesn't work for
a Kermit server unless you also tell it to ENABLE DELETE.
APPEND
Append the incoming file to the end of the existing file.
REJECT
Refuse and/or discard the incoming file (= DISCARD).
RENAME
Give the incoming file a unique name.
UPDATE
Accept the incoming file only if newer than the existing file.
Tells where to put an arriving file that is not rejected.
Options:
DISK
(default) Store incoming files on disk.
PRINTER
Send incoming files to SET PRINTER device.
SCREEN
Display incoming files on screen (local mode only).
NOWHERE
Do not put incoming files anywhere (use for calibration).
Selects the format of the file transfer display for local-mode file
transfer. The choices are:
BRIEF
A line per file, showing size, mode, status, and throughput.
SERIAL
One dot is printed for every K bytes transferred.
CRT
Numbers are continuously updated on a single screen line.
This format can be used on any video display terminal.
FULLSCREEN
A fully formatted 24x80 screen showing lots of information.
This requires a terminal or terminal emulator.
NONE
No file transfer display at all.
The directory into which all received files should be placed. By default,
received files go into C-Kermit's current directory.
End-Of-File detection method, normally LENGTH. Applies only to text-mode
transfers. When set to CTRL-Z, this makes the file sender treat the first
Ctrl-Z in the input file as the end of file (EOF), and it makes the file
receiver tack a Ctrl-Z onto the end of the output file if it does not
already end with Ctrl-Z (this is to deal with early 1980s CP/M
microcomputers).
Use this command to specify nonstandard line terminators for text files.
What to do with an incompletely received file: KEEP, DISCARD, or AUTO.
AUTO (the default) means DISCARD if transfer is in text mode, KEEP if it
is in binary mode, in which case it can be recovered from the point of
failure if the other Kermit supports the RESEND feature.
Changes the size of the internal wildcard expansion list. Use SHOW FILE
to see the current size. Use this command to increase the size if you get
a "?Too many files" error. Also see SET FILE STRINGSPACE.
Lets you control the disk output buffer for incoming files. Buffered
blocking writes are normal. Nonblocking writes might be faster on some
systems but might also be risky, depending on the underlying file service.
Unbuffered writes might be useful in critical applications to ensure that
cached disk writes are not lost in a crash, but will probably also be
slower. The optional size parameter after BUFFERED or UNBUFFERED lets you
change the disk output buffer size; this might make a difference in
performance.
ON means to use filename pattern lists to determine whether to send a file
in text or binary mode. OFF means to send all files in the prevailing mode.
AUTO (the default) is like ON if the other Kermit accepts Attribute packets
and OFF otherwise. FILE PATTERNS are used only if FILE SCAN is OFF (see SET
FILE SCAN).
SHOW PATTERNS displays the current patterns.
Default: ON
If TRANSFER MODE is AUTOMATIC and FILE SCAN
is ON (these are the default settings) Kermit peeks at the file's contents
to see if it's text or binary. Use SET FILE SCAN OFF to disable file
peeking, while still keeping TRANSFER MODE automatic to allow name patterns
and other methods. The optional size is the number of file bytes to scan,
49152 by default. -1 means to scan the whole file. If TRANSFER MODE is
AUTOMATIC and FILE SCAN is ON (as it is by default) Kermit peeks at the
file's contents to see if it's text or binary. Use SET FILE SCAN OFF to
disable file peeking, while still keeping TRANSFER MODE automatic to allow
name patterns and other methods. The optional size is the number of file
bytes to scan, 49152 by default. -1 means to scan the whole file. Also
see SET FILE PATTERNS.
How file contents are to be treated during file transfer in the absence of
any other indication. TYPE can be TEXT for conversion of record format and
character set, which is usually needed when transferring text files between
unlike platforms (such as UNIX and Windows), or BINARY for no conversion if
TRANSFER MODE is MANUAL, which is not the default. Use BINARY with TRANSFER
MODE MANUAL for executable programs or binary data or whenever you wish to
duplicate the original contents of the file, byte for byte. In most modern
Kermit programs, the file sender informs the receiver of the file type
automatically. However, when sending files from C-Kermit to an ancient or
non-Kermit-Project implementation, you might need to set the corresponding
file type at the receiver as well.
Whether to write a Byte Order Mark when creating a UCS-2 file.
Although SET FILE WARNING is superseded by the newer command, SET FILE
COLLISION, it still works. SET FILE WARNING ON is equivalent to SET FILE
COLLISION RENAME and SET FILE WARNING OFF is equivalent to SET FILE
COLLISION OVERWRITE.
Whether to issue diagnostic messages for illegal function calls and
references to nonexistent built-in variables. ON by default.
Whether an illegal function call or reference to a nonexistent built-in
variable should cause a command to fail. OFF by default.
Character to use for half duplex line turnaround handshake during file
transfer. C-Kermit waits for this character from the other computer
before sending its next packet. Default is NONE; you can give one of the
other names like BELL or ESC, or use SET HANDSHAKE CODE to specify the
numeric code value of the handshake character. Type SET HANDSH ?
for a complete list of possibilities.
Sometimes wheren there's a file transfer error or some other problem,
Kermit prints some "helpful hints". If you'd rather not see them,
use SET HINTS OFF.
The protocol-switches can be:
The TELNET command is equivalent to:
SET HOST /CONNECT kermit.columbia.edu
SET HOST * 1649
SET HOST /SERVER * 1649
SET HOST 128.59.39.2
SET HOST madlab.sprl.umich.edu 3000
SET HOST xyzcorp.com 2000 /RAW-SOCKET
SET HOST /CONNECT /COMMAND rlogin xyzcorp.com
SET NETWORK TYPE TCP/IP, SET HOST name [ port ] /TELNET, IF SUCCESS CONNECT
SET IKS CDFILE READ.ME
You can also give a list of up to 8 filenames by (a) enclosing each
filename in braces, and (b) enclosing the entire list in braces. Example:
SET IKS CDFILE {{READ.ME}{aareadme.txt}{README}{read-this-first}}
When a list is given, it is searched from left to right and the first
file found is displayed.
Or: SET KEY CLEAR
Configure the key whose "scancode" is k to send the given text when pressed
during CONNECT mode. If you omit the text, the key is restored to its
default mapping. If there is no text, the default key binding is restored
for the key k. SET KEY CLEAR restores all the default key mappings.
To find out the scancode and mapping for a particular key, use
the SHOW KEY command.
Selects language-specific translation rules for text-mode file transfers.
Used with SET FILE CHARACTER-SET and SET TRANSFER CHARACTER-SET when one of
these is ASCII. An example would be converting properly-spelled German
words such as "Grüße" to their ASCII transliteration, Gruesse in this case,
which is a German-specific rule, hence the need to identify not only the
character set for a file, but also the language, when converting it to ASCII.
Selects a serial-port device to use for making connections.
For example "/dev/tty00" or "/dev/ttyS0" on Unix, "COM1" on Windows.
To use a modem to dial out, first SET MODEM TYPE (e.g., to USR), then
SET LINE xxx, then SET SPEED, then give a DIAL command.
For direct null-modem connections, use SET MODEM TYPE NONE, SET LINE xxx,
then SET FLOW, SET SPEED, and CONNECT.
Changes the locale for language and character-set to the one given. The
local-string is in the format required by your computer, such as
en_US.US-ASCII or es_VE.ISO8859-1. C-Kermit's SET LOCALE command affects
C-Kermit itself and any subprocesses, but does not affect the environment
from which C-Kermit was invoked. SET LOCAL doesn't change Kermit's
language, but it does affect such items as dates, days of the week, months,
capitalization, and system error messages. See
THIS PAGE about locales in C-Kermit.
SHOW LOCALE lists Kermit's current locale settings.
Specifies whether unprefixed file management commands should operate
locally or (when there is a connection to a remote FTP or Kermit
server) sent to the server. The affected commands are: CD (CWD), PWD,
CDUP, DIRECTORY, DELETE, RENAME, MKDIR, and RMDIR. To force any of
these commands to be executed locally, give it an L-prefix: LCD, LDIR,
etc. To force remote execution, use the R-prefix: RCD, RDIR, and so
on. SHOW COMMAND shows the current Locus.
Controls the behavior of macros.
Tells whether wildcards should match dotfiles (files whose names begin
with period) or UNIX FIFO special files. MATCH FIFO default is OFF.
MATCH DOTFILE default is OFF in UNIX, ON elsewhere.
Note: Many of the SET MODEM parameters are configured automatically when
you SET MODEM TYPE, according to the modem's capabilities. Use SHOW MODEM to
see them. Also see DIAL and
SET DIAL.
SET MODEM COMMAND commands are used to override built-in modem commands for
each modem type, or to fill in commands for the USER-DEFINED modem type.
Omitting the optional [ text ] restores the built-in modem-specific command,
if any:
AT
AT-commands
DC
data-compression
EC
error-correction
HWFC
hardware-flow
ITU
v25bis-commands
SWFC
software-flow
KS
kermit-spoof
SB
speed-buffering
TB
Telebit
Syntax: SET MOUSE ACTIVATE { ON, OFF }
Enables or disables the mouse in Connect mode. Default is ON
Syntax:
SET MOUSE BUTTON
number key-modifier action [ text ]
where:
number is the mouse button number, 1, 2, or 3;
key-modifier denotes modifier keys held down during the mouse event:
ALT, ALT-SHIFT, CTRL, CTRL-ALT CTRL-ALT-SHIFT, CTRL-SHIFT, SHIFT, NONE;
action is the mouse action, CLICK, DRAG, or DOUBLE-CLICK.
SET MOUSE BUTTON 1 NONE DOUBLE \KmouseCurPos
SET MOU B 2 SHIFT CLICK help\13
DRAG operations perform a "mark mode" selection of Text. You should
assign only the following actions to drag operations
The following Kverb is only for use with the mouse:
\Kdump
Copy marked text to printer (or file)
\Kmarkcopyclip
Copy marked text to PM Clipboard
\Kmarkcopyhost
Copy marked text direct to Host
\Kmousemark
Mark text, no copy operation performed
\KmouseCurPos
which represents the mouse-directed terminal cursor feature.
Button 1 Ctrl-Click
Kverb: \Kmouseurl
Button 1 Double-Click
Kverb: \Kmousecurpos
Button 1 Drag
Kverb: \Kmarkcopyclip
Button 1 Alt-Drag
Kverb: \Kmarkcopyclip_noeol
Button 1 Ctrl-Drag
Kverb: \Kmarkcopyhost
Button 1 Ctrl-Alt-Drag
Kverb: \Kmarkcopyhost_noeol
Button 1 Ctrl-Shift-Drag
Kverb: \Kdump
Button 2 Double-Click
Kverb: \Kpaste
Button 2 Drag
Kverb: \Kmarkcopyhost
Button 2 Alt-Drag
Kverb: \Kmarkcopyhost_noeol
Button 3 Double-Click
Kverb: \Kpaste
Wheel Up
Kverb: \Kupone
Wheel Ctrl+Up
Kverb: \Kupscn
Wheel Down
Kverb: \Kdnone
Wheel Ctrl+Down
Kverb: \Kdnscn
Syntax: SET MOUSE REPORTING { DISABLED, ENABLED, OVERRIDE }
Default: OVERRIDE
Configures sending of mouse reports to the remote host when an application
requests them. The options are:
Disabled
Applications can not request mouse reports and reports will not
be sent.
Enabled
Applications can request mouse reports. Reports will only be
sent for mouse events that have no action in C-Kermit. To
allow an event (eg, Ctrl+Click) to be reported, map it to
\Kignore. For example: set mouse button 1 ctrl click \Kignore
Override
Applications can request mouse reports. All mouse events will
be sent to the remote application regardless of what action it
is set to perform in C-Kermit. For example, if right mouse
click is set to \Kpaste this won't occur when an application
requests mouse reporting - instead the right click will be sent
to the application.
Syntax: SET MOUSE WHEEL direction key-modifier [ text ]
where:
The text has exactly the same properties as the text from the
SET KEY command — it can be a character, a string, one or more Kverbs,
a macro invoked as a Kverb, or any combination of these. Thus, anything
that can be assigned to a key can also be assigned to the mouse — and
vice versa. If the text is omitted, the action will be ignored.
Examples:
SET MOUSE WHEEL UP CTRL \Kupscn
SET MOUSE WHEEL DOWN ALT \Kdnarr
Specifies the name(s) of zero or more network directory files, similar to
dialing directories (HELP DIAL for details). The general format of a
network directory entry is:
name network-type address [ network-specific-info ]
For TCP/IP, a directory looks like this:
name tcp/ip ip-hostname-or-address [ socket ]
optionally followed by a comment that begins with " # "
or " ; ".
Select the type of network to be used with SET HOST connections:
Also see SET HOST,
TELNET,
RLOGIN.
COMMAND
Make a connection through an external command
PIPE
(Unix only) Make a connection through a pipe
PSEUDOTERMINAL
(Unix only) Make a connection through a pseudoterminal
SET NETWORK TYPE TCP/IP
Use C-Kermit's built-in support for TCP/IP
and Telnet, Rlogin, etc.
How many milliseconds to pause after sending each OUTPUT character,
normally 0.
Whether to process the special OUTPUT-only escapes \B, \L, and \N.
Normally ON (they are processed). See OUTPUT.
For use with commands that have switches; sets the default switches for
the given command. Type SET OPTIONS ? for a list of amenable
commands (at this writing they are DELETE, DIRECTORY, PURGE, and TYPE).
You can but the desired SET OPTIONS commands in your C-Kermit initialization
file so they take effect every time you start C-Kermit.
For serial-port and modem connections when communication medium or the other
computer uses the 8th bit of each byte for data or for error checking,
explained HERE.
Also see SET TERMINAL BYTESIZE, SET SERIAL, and SET STOP-BITS.
Specifies the command (such as "|lpr") or filename to be used by the PRINT
command. If a filename is given, each PRINT command appends to the given
file. If the SET PRINTER argument contains spaces, it must be enclosed in
braces, e.g. "set printer {| lpr -Plaser}". If the argument is
omitted the default value is restored. SHOW PRINTER lists the current
printer. See PRINT for further info.
File transfer: Selects the degree of control-character prefixing when
sending files. If sending files always fails, this is the first thing
to look at. Also see SET CONTROL-CHARACTER.
C-Kermit's interactive command prompt is normally:
(your-current-directory) C-Kermit>
for example:
(~/fdc/beta06/) C-Kermit>
In Windows it is:
(your-current-directory) CKW>
(CKW is C-Kermit for Windows).
You can use SET PROMPT to change it to whatever you want. The text
can contain backslash codes for special effects, including variables like
\v(dir) to show current directory (as in the example) or \v(time) the
current time of day, or \v(host) which is the name of your computer.
Surround text by { } to preserve leading or trailing spaces.
If text omitted, prompt reverts to the format shown above.
Selects protocol to use for transferring files. s1 and s2 are
commands to output prior to SENDing with this protocol, to automatically
start the RECEIVE process on the other end in binary or text mode,
respectively. If the protocol is KERMIT, s3 is the command to start
a Kermit server on the remote computer, and there are no s4-s6
commands. Otherwise, s3 and s4 are commands used on this
computer for sending files with this protocol in binary or text mode,
respectively; s5 and s6 are the commands for receiving files
with this protocol. Use "%s" in any of these strings to represent the
filename(s). Use { braces } if any command contains spaces.
Examples:
set proto kermit {kermit -YQir} {kermit -YQTr} {kermit -YQx}
set proto ymodem rb {rb -a} {sb %s} {sb -a %s} rb rb
External protocols require REDIRECT and external file transfer programs that
use redirectable standard input/output.
Normally OFF. ON disables most information messages during interactive
operation.
Specifies parameters for inbound packets:
Tells Kermit whether its connection is reliable. Default is AUTO,
meaning Kermit should figure it out for itself. In general, network
connections are reliable; modem connections with hardware flow control
and error corrections are reliable; others might not be.
See RENAME.
SET REPEAT COUNTS turns the repeat-count compression mechanism ON and OFF
for sending files. The default is ON. SET REPEAT PREFIX code sets the
repeat-count prefix character to the given code. The default is 126 (tilde).
In Kermit protocol file transfers: How many times to retransmit a
particular packet before giving up; 0 = no limit.
Sets the root for file access to the given directory and disables access
to system and shell commands and external programs. Once this command
is given, no files or directories outside the tree rooted by the given
directory can be opened, read, listed, deleted, renamed, or accessed in
any other way. This command can not be undone by a subsequent SET ROOT
command. Primarily for use with server mode, to restrict access of
clients to a particular directory tree, and with an Internet Kermit
Server, for the same reason. Synonym: CHROOT.
Disables/Enables echoing of SCRIPT command operation.
File transfer: parameters for the SEND command affecting outbound files or
packets:
This command lets you set three differnet serial-port parameters at once:
d is data length in bits, 7 or 8; p is first letter of parity; s is stop
bits, 1 or 2. Parities are Even, Odd, Mark, Space, and None.
Examples: "set serial 7e1", "set serial 8n1".
.
SET SESSION-LOG { BINARY, DEBUG, NULL-PADDED, TEXT, TIMESTAMPED-TEXT }
If BINARY, record all CONNECT characters in session log. If TEXT, strip
out CR, NUL, and XON/XOFF characters. DEBUG is the same as BINARY but
also includes Telnet negotiations on TCP/IP connections.
Tells whether SLEEP (PAUSE) or WAIT commands can be interrupted from the
keyboard; ON by default.
Speed for serial-port communication device specified in most recent SET
LINE command, in bits per second. Type SET SPEED ? for a list of possible
speeds; these are the speeds C-Kermit knows about, but there is no way to
know if they can actually be used on your computer's hardware, so if (say)
SET SPEED 11500000 fails, try another speed. This command has no effect
on your login's controlling terminal.
Specifies the shell command to be used to start the external ssh client and
make an SSH connection. By default it is "ssh -e none" (ssh with no escape
character).
publickey keyboard-interactive password none
aes256-gcm@openssh.com aes128-gcm@openssh.com aes256-ctr aes192-ctr
aes128-ctr aes256-cbc aes192-cbc aes128-cbc 3des-cbc
\v(common)ssh/known_hosts2
ssh-ed25519 ecdsa-sha2-nistp521 ecdsa-sha2-nistp384 ecdsa-sha2-nistp256
rsa-sha2-512 rsa-sha2-256 ssh-rsa
curve25519-sha256 curve25519-sha256@libssh.org ecdh-sha2-nistp256
ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group18-sha512
diffie-hellman-group16-sha512 diffie-hellman-group-exchange-sha256
diffie-hellman-group14-sha256 diffie-hellman-group14-sha1
diffie-hellman-group1-sha1 ext-info-c
SET SSH V2 MACS { HMAC-MD5, HMAC-SHA1-ETM@OPENSSH.COM, HMAC-SHA2-256,
HMAC-SHA2-256-ETM@OPENSSH.COM, HMAC-SHA2-512,
HMAC-SHA2-512-ETM@OPENSSH.COM, NONE }
hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com
hmac-sha1-etm@openssh.com hmac-sha2-256 hmac-sha2-512 hmac-sha1
\v(appdata)ssh/known_hosts2
Number of stop bits to use on serial-port and/or modem connections
connections, normally 1.
Tells Kermit whether streaming protocol can be used during Kermit file
transfers. Default is AUTO, meaning use it if connection is reliable,
e.g. an Internet connection.
Disable the SUSPEND command, suspend signals,
and (on Unix) esc-charZ (suspend) during CONNECT.
Controls behavior of TAKE command:
These items let you tune TCP networking performance on a per-connection
basis by adjusting parameters you normally would not have access to. You
should use these commands only if you feel that the TCP/IP protocol stack
Kermit is using is giving you inadequate performance, and then only if
you understand the concepts (see, for example, the Comer TCP/IP books), and
then at your own risk. These settings are displayed by SHOW NETWORK. Not
all options are necessarily available in all Kermit versions; it depends on
the underlying TCP/IP services.
SET TCP SENDBUF number
For TCP/IP TELNET connections, which are in NVT
(Network Virtual Terminal ASCII) mode by default:
SET LOGIN USERID {}
has been issued prior to a Telnet authentication negotiation for an
authentication type that requires the transmission of a name, such as
Secure Remote Password.
SET HOST *
This command determines whether Kermit will actually echo characters
received from the remote when it has negotiated to do so. The default
is ON. Remote echoing may be turned off when it is necessary to read
a password with the INPUT command.
[ { ACCEPTED, REFUSED, REQUESTED, REQUIRED } ]
Synonym: SET TMP-DIRECTORY
Tells Kermit to use the given directory for creating temporary files.
These are used (for example) in FTP downloads and by the CHANGE command.
If you don't issue this command, C-Kermit picks a directory automatically
based on the operating system and any environment variables you might have
set. Use SHOW TEMP-DIRECTORY or SHOW VARIABLE \v(tmpdir) to see Kermit's
current temporary directory setting.
Type SHOW TERMINAL to see current terminal settings.
Type SHOW TERMINAL to see current terminal settings.
SET TERMINAL KEY mode DEFAULT
SET TERMINAL KEY mode CLEAR
Selects the transaction-log format; BRIEF and FTP have one line per file;
FTP is compatible with FTP log. VERBOSE (the default) has more info.
Synonym: SET XFER
Choices:
TRANSPARENT
no translation, the default
ASCII
LATIN1
ISO 8859-1 Latin Alphabet 1
LATIN2
ISO 8859-2 Latin Alphabet 2
LATIN9
ISO 8859-15 Latin Alphabet 9
CYRILLIC-ISO
ISO 8859-5 Latin/Cyrillic
GREEK-ISO
ISO 8859-7 Latin/Greek
HEBREW-ISO
ISO 8859-8 Latin/Hebrew
JAPANESE-EUC
JIS X 0208 Kanji + Roman and Katakana
UCS-2
ISO 10646 / Unicode 2-byte form
UTF-8
ISO 10646 / Unicode 8-bit serialized transformation format
Synonym: SET XMIT.
Controls the behavior of the TRANSMIT command.
SHOW TRANSMIT displays current settings.
DISCARD (default action) means reject any arriving files encoded in unknown
character sets. KEEP means to accept them anyway.
The C-Kermit variables \%1-\%9 and \%a-\%z, as well as its arrays,
\&[a]-\&[z], have always been evaluated recursively. 99% of
C-Kermit users,, maybe more, don't know this and can obtain curious
results using them on (say) DOS/Windows file specifications:
.tmpdir := c:\users\fdc\tmp
?ERROR:NO_SUCH_FUNCTION:\fdctmp()
In a rare departure from the cardinal rule — always make new C-Kermit
releases backwards-compitable with previous ones — these variables are
now evaluated one-level deep instead of recursively; in other words, their
literal definition is returned. This change can be undone by putting the
command SET VARIABLE-EVALUATION RECURSIVE at the head of any script, and/or
in your C-Kermit initialization file.
KERMIT (the default) means C-Kermit expands filename wildcards in SEND and
similar commands itself, and in incoming GET commands. Optional switches
are /NO-MATCH-DOT-FILES ("*" and "?" should not match an initial
period in a filename; this is the default) and /MATCH-DOT-FILES if you
want files whose names begin with "." included. SET WILDCARD SHELL
means that Kermit asks your preferred shell to expand wildcards (this
should not be necessary in C-Kermit 7.0 and later). HELP WILDCARD for
further information.
Specifies number of slots for sliding windows, i.e. the number of packets
that can be transmitted before waiting for acknowledgement. The default
is one, the maximum is 32. Increased window size might result in reduced
maximum packet length. Use sliding windows for improved efficiency on
connections with long delays. A full duplex connection is required, as
well as a cooperating Kermit on the other end.
The SHOW command
File binary-patterns:
*.gz *.Z *.tgz *.gif *.tar *.zip *.o *.so *.a *.out *.exe *.jpg *.jpeg
*.tif *.tiff *.pdf *.so.* *.class *.rpm *.bmp *.bz2 *.BMP *.dll *.doc *.vxd
*.dcx *.xl* *.lzh *.lhz *.au *.voc *.mpg *.mpeg [wk]ermit *.ps
File text-patterns:
*.txt *.c *.h *.r *.w *.cpp *.cc *.ksc *.bwr *.upd *.html *.htm *.mss *.tex
*.nr [Mm]akefile *.hex *.hqx *.for *.f77 *.f *.F *.s *.pas *.java *.el
*.lisp *.sh *.m4 *.perl *.pl *.pod *.pm *.awk *.sno *.spt *.sed *.ksc *.TXT
*read.me *READ.ME .* */.* *.mem *.mac
If you ever experience an error in which C-Kermit sends a file
in the wrong mode you can SET FILE SCAN OFF
and then tinker with the patterns.
FTP commands
Since version 8.0, C-Kermit has had its own built-in scriptable FTP client.
Further information:
Command-line arguments
Like most Unix commands, C-Kermit can be be given options on the command line.
C-Kermit is generally installed in the PATH as "kermit", and therefore is
invoked by typing the word "kermit" (lowercase) at the shell prompt, and then
pressing the Return or Enter key. If you wish to include command-line
options, put them after the word "kermit" but before pressing Return or Enter,
separated by spaces, for example:
$ kermit -s ckermit.tar.gz
Option
Action?
Description
N
(digit zero) 100% transparent Connect state for "in-the-middle"
operation: 8 bits, no parity, no escape character, everything passes through.
N
(digit eight) Connection is 8-bit clean (this is the
default since C-Kermit 9.0). Equivalent to the EIGHTBIT command, which in turn
is a shortcut for SET TERMINAL BYTESIZE 8, SET COMMAND BYTESIZE 8, SET PARITY
NONE.
N
(digit nine) Make a connection to an FTP server.
Equivalent to the FTP OPEN command.
Argument:
IP-address-or-hostname[
NOTE: C-Kermit also has a separate FTP command-line personality,
with regular FTP-like command-line syntax.
More about this below.
N
Kermit is to be started as an Internet service (IKSD) (only from
N
Kermit is running in Batch or Background
(no controlling terminal).
To be used in case Kermit doesn't automatically sense its background status.
Equivalent to the SET BACKGROUND ON command.
N
Interactive-mode Commands to be executed.
Argument: Commands separated by commas, list in doublequotes.
N
Delay before starting to send in Remote mode.
Equivalent to the SET DELAY command.
Argument: Number of seconds.
N
Exit automatically when connection closes.
Equivalent to SET EXIT ON-DISCONNECT ON.
N
Use an open TCP connection.
Argument: Numeric file descriptor of open TCP connection.
Also see:
Y
Get file(s) from server, send contents to standard output,
which normally would be piped to another process.
Argument: Remote file specification, in quotes if it contains
metacharacters.
Also see:
N
Suppress program startup Herald and greeting.
N
Tell Kermit it has a reliable connection, to force streaming
to be used where it normally would not be. Equivalent to the SET RELIABLE
ON command.
N
"Be like Telnet."
Like
Argument: IP hostname/address optionally followed by service.
NOTE: C-Kermit also has a separate Telnet
command-line personality, with regular Telnet-like command-line syntax.
More about this below.
N
Recursive directory descent for files in
N
My user name (for use with Telnet, Rlogin, FTP, etc).
Equivalent to the SET LOGIN USER command.
Argument: Username string.
Y
(Uppercase letter O) Be a server for One command only.
Also see:
N
Don't convert file (Path) names of transferred files.
Equivalent to SET FILE NAMES LITERAL.
N
Quick Kermit protocol settings. Equivalent to the FAST
command. This is the default in C-Kermit 7.0 and later.
N
Remote-only (this just makes IF REMOTE true).
N
Stay (enter command parser after action options).
N
Force Text mode for file transfer; implies
N
Disable automatic per-file text/binary switching.
Equivalent to SET TRANSFER MODE MANUAL.
N
Skip (don't execute) the
initialization file.
N
As-name for file(s) in
Argument: As-name string (alternative filename).
When receiving files, this can be a directory name.
N
Speed for serial device. Equivalent to SET SPEED.
Argument: Numeric Bits per second for serial connections.
Y
Enter Connect state before transferring files.
N
Create a
N
Maximum length for incoming Kermit file-transfer packets.
Equivalent to SET RECEIVE PACKET-LENGTH.
Argument: Length in bytes.
Y
Send a FINISH command to a Kermit server.
N
Get file(s) from a Kermit server.
Argument: File specification on other computer, in quotes if it
contains metacharacters. Equivalent to GET.
Also see:
Y
Print Help text for single-letter command-line options
(pipe thru 'more' to prevent scrolling).
N
Force binary (Image) mode for file transfer; implies
N
Make a TCP/IP connection.
Argument: IP host name/address and optional service name or number.
Equivalent to the TELNET command.
Also see:
Y
Receive file(s) to standard output, which normally would be
piped to another process.
Also see:
N
(Lowercase letter L)
Make a connection on the given serial communications device. Equivalent
to the SET LINE (SET PORT) command.
Argument: Serial device name, e.g.
N
Modem type for use with the
Argument: Modem name as in SET MODEM TYPE command, e.g. "usrobotics".
Y
Enter Connect state after transferring files (historical).
N
Parity. Equivalent to the SET PARITY command.
Argument: One of the following: e(ven), o(dd), m(ark), n(one), s(pace).
N
Quiet (suppress most messages). Equivalent to SET QUIET ON.
Y
Receive file(s). Equivalent to the RECEIVE command.
Argument: (none, but see
N
Send file(s).
Argument: One or more local file specifications. Equivalent to the
SEND command.
Also see:
N
(Historical) Xon (Ctrl-Q) Turnaround character for
half-duplex connections (used on serial linemode connections to old
mainframes). Equivalent to SET DUPLEX HALF, SET HANDSHAKE XON.
N
Window size for Kermit protocol (ignored when streaming).
Equivalent to SET WINDOW-SIZE.
Argument: Number, 1 to 32.
N
Incoming files Write over existing files. Equivalent to
SET FILE COLLISION OVERWRITE.
Y
Enter server mode. Equivalent to the SERVER command.
Also see:
N
Alternative initialization file.
Argument: Filename.
N
Force foreground behavior.
To be used in case Kermit doesn't automatically sense its foreground status.
Equivalent to the SET BACKGROUND OFF command.
Option
Description
File to display upon startup or IKSD login.
File to be sent for display to the client when server changes directory
(filename is relative to the changed-to directory).
Enable/disable the server CD message feature.
Prints usage message for extended options.
Designates a file containing custom text to replace the top-level
HELP command.
Disables keyboard interrupts.
Disables the Kermit protocol file-permissions attribute, to prevent
transmission of file permissions (protection code) from sender to receiver.