📄 ckututor.txt
字号:
And plus, C-Kermit and K95 also switch automatically between text and binary mode for each file, so there is no need to "set file type binary" or "set file type text", or to worry about files being corrupted because they were transferred in the wrong mode. What all of these words add up to is that now, when you use up-to-date Kermit software from the Kermit Project, file transfer is not only fast, it's ridiculously easy. You barely have to give any commands at all. Downloading Files Let's say you have [112]Kermit 95, [113]C-Kermit, or [114]MS-DOS Kermit on your desktop computer, with a connection to a Unix computer that has C-Kermit installed as "kermit". To download a file (send it from Unix to your desktop computer), just type the following command at your Unix shell prompt: kermit -s oofa.txt (where oofa.txt is the filename). If you want to send more than one file, you can put as many filenames as you want on the command line, and they can be any combination of text and binary: kermit -s oofa.txt oofa.zip oofa.html oofa.tar.gz and/or you can use wildcards to send groups of files: kermit -s oofa.* If you want to send a file under an assumed name, use: kermit -s friday.txt -a today.txt This sends the file friday.txt but tells the receiving Kermit that its name is today.txt. In all cases, as noted, when the file transfer is finished, your desktop Kermit returns automatically to Connect state. No worries about escaping back, re-connecting, text/binary mode switching. Almost too easy, right? Uploading Files To upload files (send them from your desktop computer to the remote Unix computer) do the same thing, but use the -g (GET) option instead of -s: kermit -g oofa.txt This causes your local Kermit to enter server mode; then the remote Kermit program requests the named file and the local Kermit sends it and returns automatically to Connect state when done. If you want to upload multiple files, you have have use shell quoting rules, since these aren't local files: kermit -g "oofa.txt oofa.zip oofa.html oofa.tar.gz" kermit -g "oofa.*" If you want to upload a file but store it under a different name, use: kermit -g friday.txt -a today.txt Kermit Transfers the Old-Fashioned Way If your desktop communications software does not support autoupload or autodownload, or it does not include Kermit server mode, the procedure requires more steps. To download a file, type: kermit -s filename on the host as before, but if nothing happens automatically in response to this command, you have to switch your desktop communications software into Kermit Receive state. This might be done by escaping back using keyboard characters or hot keys (Alt-x is typical) and/or with a command (like RECEIVE) or a menu. When the file transfer is complete, you have to go back to Connect state, Terminal emulation, or whatever terminology applies to your desktop communications software. To upload a file, type: kermit -r on the host (rather than "kermit -g"). This tells C-Kermit to wait passively for a file to start arriving. Then regain the attention of your desktop software (Alt-x or whatever) and instruct it to send the desired file(s) with Kermit protocol. When the transfer is finished, return to the Connect or Terminal screen. If File Transfer Fails Although every aspect of Kermit's operation can be finely tuned, there are also three short and simple "omnibus tuning" commands you can use for troubleshooting: FAST Use fast file-transfer settings. This has been the default since C-Kermit 7.0 now that most modern computers and connections support it. If transfers fail with fast settings, try . . . CAUTIOUS Use cautious but not paranoid settings. File transfers, if they work, will go at medium speed. If not, try . . . ROBUST Use the most robust, resilient, conservative, safe, and reliable settings. File transfers will almost certainly work, but they will be quite slow (of course this is a classic tradeoff; ROBUST was C-Kermit's default tuning in versions 6.0 and earlier, which made everybody think Kermit protocol was slow). If ROBUST doesn't do the trick, try again with SET PARITY SPACE first in case it's not an 8-bit connection. Obviously the success and performance of a file transfer also depends on C-Kermit's file transfer partner. Up-to-date, real [115]Kermit Project partners are recommended because they contain the best Kermit protocol implementations and because [116]we can support them in case of trouble. If you still have trouble, consult Chapter 10 of [117]Using C-Kermit, or send email to [118]kermit-support@columbia.edu. Advanced Kermit File-Transfer Features Obviously there is a lot more to Kermit file transfer, including all sorts of interactive commands, preferences, options, logging, debugging, troubleshooting, and anything else you can imagine but that's what the [119]manual and updates are for. Here are a few topics you can explore if you're interested by Typing HELP for the listed commands: Logging transfers: LOG TRANSACTIONS (HELP LOG) Automatic per-file text/binary mode switching: SET TRANSFER MODE { AUTOMATIC, MANUAL } (HELP SET TRANSFER). Cross-platform recursive directory tree transfer: SEND /RECURSIVE, GET /RECURSIVE (HELP SEND, HELP GET). File collision options: SET FILE COLLISION { OVERWRITE, BACKUP, DISCARD, ... } (HELP SET FILE). Update mode (only transfer files that changed since last time): SET FILE COLLISION UPDATE (HELP SET FILE). Filename selection patterns: (HELP WILDCARD). Flexible file selection: SEND (or GET) /BEFORE /AFTER /LARGER /SMALLER /TYPE /EXCEPT, ... Character-set conversion: SET { FILE, TRANSFER } CHARACTER-SET, ASSOCIATE, ... File/Pathname control: SET { SEND, RECEIVE } PATHNAMES, SET FILE NAMES. Atomic file movement: SEND (or GET) /DELETE /RENAME /MOVE-TO Transferring to/from standard i/o of other commands: SEND (or GET) /COMMAND Recovery of interrupted transfer from point of failure: RESEND, REGET (HELP RESEND, HELP REGET). Non-Kermit File Transfer You can also use C-Kermit to transfer files with FTP or HTTP Internet protocols; [120]see below. On a regular serial or Telnet connection where the other computer doesn't support Kermit protocol at all, you have several options. For example, if your desktop communications software supports Zmodem, use "rz" and "sz" on the host rather than Kermit. But if Kermit is your desktop software, and you are using it to make calls or network connections to other computers that don't support Kermit protocol (or that don't have a good implementation of it), then if your computer also has external X, Y, or Zmodem programs that are redirectable, Kermit can use them as external protocols. HELP SET PROTOCOL for details. You can also capture "raw" data streams from the other computer with LOG SESSION (HELP LOG and HELP SET SESSION-LOG for details), and you can upload files without any protocol at all with TRANSMIT (HELP TRANSMIT, HELP SET TRANSMIT). [ [121]Kermit Home ] [ [122]C-Kermit Home ] [ [123]C-Kermit FAQ ] ________________________________________________________________________ KERMIT CLIENT/SERVER CONNECTIONS [ [124]Top ] [ [125]Contents ] [ [126]Next ] [ [127]Previous ] On any kind of connection you can make with Kermit -- serial, TCP/IP, X.25, etc -- you can set up a convenient client/server relationship between your Kermit client (the one that made the connection) and the Kermit program on the far end of the connection (the remote Kermit) by putting the remote Kermit in server mode. This is normally done by giving it a SERVER command, or by starting it with the -x command-line option. In some cases ([128]Internet Kermit Service, SSH connections to a Kermit subsystem, or specially configured hosts), there is already a Kermit server waiting on the far end. Here is a quick synopsis of the commands you can give to the client for interacting with the server: SEND [ switches ] filename Sends the named file to the server. The filename can include wildcards. Lots of switches are available for file selection, etc. Type HELP SEND at the client prompt for details. GET [ switches ] filename Asks the server to send the named file. The filename can include wildcards. Type HELP GET at the client prompt for details. BYE Terminates the server and closes your connection to it. FINISH Terminates the server. If you started the server yourself, this leaves the remote host at its shell prompt. If it was a dedicated server (such as IKSD or an SSH subsystem), FINISH is equivalent to BYE. SET LOCUS { LOCAL, REMOTE, AUTO } (C-Kermit 8.0.201 and later, K95 1.1.21 and later) This tells the client whether file-management commands like CD, PWD, DIRECTORY, DELETE, MKDIR, etc, should be executed locally or by the server. In this type of connection, the default is LOCAL. Use SET LOCUS REMOTE if you want Kermit to behave like an FTP client, in which case these commands are executed remotely, and their local versions must have an L prefix: LCD, LPWD, LDIRECTORY, etc. When LOCUS is LOCAL, then the remote versions must have an R prefix: RCD, RPWD, RDIRECTORY, etc. HELP SET LOCUS for details. SHOW COMMAND to see current locus. The following commands are affected by SET LOCUS: CD, LCD, RCD Change (working, current) directory. HELP CD for details. CDUP, LCDUP, RCDUP CD one level up. DIRECTORY, LDIRECTORY, RDIRECTORY Produce a directory listing. Many options are available for local listings. HELP DIRECTORY for details. DELETE, LDELETE, RDELETE Deletes files or directories. Many options available, HELP DELETE. RENAME, LRENAME, RRENAME Renames files or directories. Many options available, HELP RENAME. MKDIR, LMKDIR, RMKDIR Creates a directory. HELP MKDIR. RMDIR, LRMDIR, RRMDIR Removes a directory. HELP RMDIR. There are dozens -- maybe hundreds -- of other commands, described in the built-in help, on the website, and/or in the published or online manuals. But even if you don't have access to documentation, you can "set locus remote" and then use pretty much the same commands you would use with any FTP client.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -