Finally, if Kermit's first command-line option is a Telnet, FTP, IKSD, or HTTP URL,
Kermit automatically makes the appropriate kind of connection and, if indicated by the URL, takes the desired action:
kermit telnet:xyzcorp.com ; Opens a Telnet session
kermit telnet://[email protected] ; Ditto for user olga
kermit ftp://[email protected]/public/somefile.zip ; Downloads a file
kermit kermit://kermit.columbia.edu/kermit/f/READ.ME ; Ditto for IKSD
kermit iksd://kermit.columbia.edu/kermit/f/READ.ME ; (This works too)
kermit https://kermitproject.org/index.html ; Grabs a web page
kermit https://wwws.xyzcorp.com/secret/plan.html ; Grabs a secure web page
COMMAND-LINE OPTIONS
Usage:
1. kermit [filename] [-x arg [-x arg]...[-yyy]..] [ {=,--,+} text ] ]
2. kermit URL
-x is an option requiring an argument;
-y is an option with no argument.
- If the first argument is the name of a file, interactive-mode commands are executed from the file.
- The '=' (or "--") argument tells Kermit not to parse the remainder of the command line, but to make the words following '=' available as %1, %2, ... %9.
- The "+" argument is like "=" but for use in "kerbang scripts" (explained below).
- A second command-line format allows the one and only argument to be a Telnet, FTP, HTTP, or IKSD URL.
Order of execution:
- The command file (if any).
- The initialization file, if any, unless suppressed with -Y.
- The customization file (if it is executed by the initialization file).
- The command-line URL (if any, and if so, execution stops here).
- Command-line options (if any).
- Interactive commands.
Some command-line options can cause actions (such as -s to send a file); others just set parameters.
If any action options are included on the command line, Kermit exits when finished unless also given the -S ("stay") option. If no action options are given, no initialization or command files contained an EXIT or QUIT command, and no fatal errors occurred, Kermit issues its prompt and waits for you to type commands.
Bear in mind that C-Kermit can be built with selected features disabled, and also that certain features are not available on all platforms. For example, C-Kermit can't be built with TCP/IP support on a platform that does not have TCP/IP header files and libraries (and even if Kermit does include TCP/IP support, it can't be used to make TCP/IP connections on a computer that does not have a TCP/IP stack installed). If your version of C-Kermit lacks a feature mentioned here, use its SHOW FEATURES command to see what might have been excluded.
C-Kermit has three kinds of commands: regular single-letter command-line options, extended-format command-line options, and interactive commands.
Like most Unix commands, C-Kermit can be be given options on the command line. But C-Kermit also can be used interactively by giving it commands composed of words, which are more intuitive than cryptic command-line options, and more flexible too. In other words, you don't have to use C-Kermit's command-line options, but they are available if you want to. (By the same token, you don't have to use its interactive commands either -- you can use either or both in any combination.)
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
('$' is the shell prompt; kermit -s ckermit.tar.gz is what you type, followed by Return or Enter.)
Here is** a list of C-Kermit's single-letter command-line options**,
which start with a single dash (-), in ASCII ("alphabetical") order. Alphabetic case is significant (-A is not the same as -a).
The Action? column contains Y for action options and N for non-action options.
Option Action? Description
-0 N (digit zero) 100% transparent Connect state for "in-the-middle" operation: 8 bits, no parity, no escape character, everything passes through.
-8 N (digit eight) Connection is 8-bit clean (this is the default in C-Kermit 9.0 and later). Equivalent to the EIGHTBIT command, which in turn is a shortcut for SET TERMINAL BYTESIZE 8, SET COMMAND BYTESIZE 8, SET PARITY NONE.
-9 arg N (digit nine) Make a connection to an FTP server. Equivalent to the FTP OPEN command.
Argument: IP-address-or-hostname[:optional-TCP-port].
NOTE: C-Kermit also has a separate FTP command-line personality, with regular FTP-like command-line syntax. More about this below.
-A N Kermit is to be started as an Internet service (IKSD) (only from inetd.conf).
-B 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.
-C arg N Interactive-mode Commands to be executed.
Argument: Commands separated by commas, list in doublequotes.
-D arg N Delay before starting to send in Remote mode. Equivalent to the SET DELAY command.
Argument: Number of seconds.
-E N Exit automatically when connection closes. Equivalent to SET EXIT ON-DISCONNECT ON.
-F arg N Use an open TCP connection.
Argument: Numeric file descriptor of open TCP connection.
Also see: -j, -J.
-G arg 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: -g, -k.
-H N Suppress program startup Herald and greeting.
-I 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.
-J arg N "Be like Telnet." Like -j but implies -E.
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.
-L N Recursive directory descent for files in -s option.
-M arg N My user name (for use with Telnet, Rlogin, FTP, etc). Equivalent to the SET LOGIN USER command.
Argument: Username string.
-O Y (Uppercase letter O) Be a server for One command only. Also see: -x.
-P N Don't convert file (Path) names of transferred files. Equivalent to SET FILE NAMES LITERAL.
-Q N Quick Kermit protocol settings. Equivalent to the FAST command. This is the default in C-Kermit 7.0 and later.
-R N Remote-only (this just makes IF REMOTE true).
-S N Stay (enter command parser after action options).
-T N Force Text mode for file transfer; implies -V. Equivalent to SET TRANSFER MODE MANUAL, SET FILE TYPE TEXT.
-V N Disable automatic per-file text/binary switching. Equivalent to SET TRANSFER MODE MANUAL.
-Y N Skip (don't execute) the initialization file.
-a arg N As-name for file(s) in -s, -r, or -g.
Argument: As-name string (alternative filename). When receiving files, this can be a directory name.
-b arg N Speed for serial device. Equivalent to SET SPEED.
Argument: Numeric Bits per second for serial connections.
-c Y Enter Connect state before transferring files.
-d N Create a debug.log file with detailed debugging information (a second -d adds timestamps). Equivalent to LOG DEBUG but takes effect sooner.
-e arg N Maximum length for incoming Kermit file-transfer pa