⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gkermit.nr

📁 使用Kermit协议传输文件的程序
💻 NR
字号:
.\" @(#) gkermit.1 1.00 Columbia University 1999/12/25.TH GKERMIT 1C "25 Dec 1999" "UNIX G-Kermit".SH NAMEgkermit \- G-Kermit (GNU Kermit) 1.00 file transfer software..ll 80.SH SYNOPSIS.nf.spgkermit [ options ] -s file(s)    Send filesgkermit [ options ] -g file(s)    Get filesgkermit [ options ] -r            Receive files.PP.SH DESCRIPTIONG-Kermit is a UNIX program for transferring files using theKermit protocol.  G-Kermit is a product of Kermit Project at ColumbiaUniversity.  It is free software under the GNU Public License.  See theCOPYING file for details..PP.SS INVOKING G-KERMIT.PPThe G-Kermit binary is called "gkermit".  It should be stored someplacein your UNIX PATH; normally it is available as /usr/local/bin/gkermit.To run G-Kermit, just type "gkermit" followed by command-line options thattell it what to do.  If no options are given, it prints a usage messagelisting the available options..PPIf an option takes an argument, the argument is required; if an option doesnot take an argument, no argument may be given (exception: -d).  The actionoptions are -r, -s, and -g.  Only one action option may be given.  If noaction options are given, G-Kermit does nothing (except possibly to print itsusage message or create a debug.log file).  Here are some examples ("$ " isthe shell prompt):.nf.sp  $ gkermit -s hello.c   <-- Send the hello.c file  $ gkermit -s hello.*   <-- Send all hello.* files  $ gkermit -r           <-- Wait to receive files  $ gkermit -g hello.c   <-- Get hello.c file  $ gkermit -g hello.\\*  <-- Get all hello.* files.sp.fiOptions that do not take arguments can be "bundled" with other options.An option that takes an argument must always be followed by a space andthen its argument(s).  Examples:.nf.sp  $ gkermit -is hello.o  <-- Send hello.o in binary mode  $ gkermit -dr          <-- Receive with debugging.sp.fi.SS COMMAND-LINE OPTIONS.sp.nf  -r      RECEIVE.  Wait for incoming files.  -s fn   SEND.  Send file(s) specified by fn.  -g fn   GET.  Get specified file(s) from server.  -a fn   AS-NAME.  Alternative name for file.  -i      IMAGE.  Binary-mode transfer (default).  -T      TEXT. Text-mode transfer.  -P      PATH (filename) conversion disabled.  -w      WRITEOVER when filenames collide.  -K      KEEP incompletely received files.  -p x    PARITY. x = e,o,m,s,n; default = n(one).  -e n    PACKET LENGTH.  n = 40-9000; default=4000.  -b n    TIMEOUT.  Per-packet timeout, seconds.  -x      XON/XOFF.  Set Xon/Xoff in the tty driver.  --x     Unset Xon/Xoff in the tty driver.  -S      STREAMING disabled.  -X      EXTERNAL.  G-Kermit is an external protocol.  -q      QUIET.  Suppress messages.  -d      DEBUG.  Write debugging info to ./debug.log.  -d fn   DEBUG.  Write debugging info to given file.  -h      HELP.  Display brief usage message..fi.PPYou may supply options to G-Kermit on the command line or through theGKERMIT environment variable, which can contain any valid gkermitcommand-line options.  These are processed before the actual command-lineoptions and so can be overridden by them.  Example for bash or ksh, which youcan put in your profile if you want to always keep incomplete files, suppressstreaming, suppress messages, and use Space parity:.nf.sp  export GKERMIT="-K -S -q -p s".fi.PP.SS MECHANICS OF FILE TRANSFER.PPTo transfer files with G-Kermit you must be connected through a terminalemulator to the UNIX system where G-Kermit is running, meaning you areonline to UNIX and have access to the shell prompt (or to a menu that hasan option to invoke G-Kermit).  The connection can be serial (direct ordialed) or network (Telnet, Rlogin, X.25, etc)..PPWhen you tell G-Kermit to SEND a file (or files), e.g. with:.nf.sp  $ gkermit -Ts oofa.txt.sp.fiit pauses for a second and then sends its first packet.  What happens nextdepends on the capabilities of your terminal emulator:.PP.in +0.5i.ll -0.5i.ta +0.2i.ti -0.2i\(bu	If your emulator supports Kermit "autodownloads" then it receives thefile automatically and puts you back in the terminal screen when done..sp.ti -0.2i\(bu	Otherwise, you'll need to take whatever action is required by youremulator to get its attention: a mouse action, a keystroke like Alt-x,or a character sequence like Ctrl-\\ or Ctrl-] followed by the letter"c" (this is called "escaping back") and then tell it to receive thefile.  When the transfer is complete, you must instruct your emulatorto go back to its terminal screen..ll +0.5i.in -0.5i.fi.PPDuring file transfer, most terminal emulators put up some kind of runningdisplay of the file transfer progress..PPWhen you tell G-Kermit to RECEIVE (with "gkermit -r"), this requires you toescape back to your terminal emulator and instruct it to send the desiredfile(s)..PPIf your terminal emulator supports Kermit autodownloads AND Kermit servermode, then you can use GET ("gkermit -g files...") rather than RECEIVE("gkermit -r"), and the rest happens automatically, as when G-Kermit issending..SS INTERRUPTING FILE TRANSFER.PPG-Kermit supports file and group interruption.  The method for interruptinga transfer depends on your terminal emulator.  For example, while thefile-transfer display is active, you might type the letter 'x' to cancel thecurrent file and go on to the next one (if any), and the letter 'z' tocancel the group.  Or there might be buttons you can click with your mouse..PPWhen G-Kermit is in packet mode and your terminal emulator is in itsterminal screen, you can also type three (3) Ctrl-C characters in a row tomake G-Kermit exit and restore the normal terminal modes..PP.SS TEXT AND BINARY TRANSFER MODE.PPWhen sending files in binary mode, G-Kermit sends every byte exactly as itis stored on the disk.  This mode is appropriate for program binaries,graphics files, tar archives, compressed files, etc, and is G-Kermit'sdefault file transfer mode when sending.  When receiving files in binarymode, G-Kermit simply copies each byte to disk.  (Obviously the bytes areencoded for transmission, but the encoding and decoding procedures give areplica of the original file after transfer.).PPWhen sending files in text mode, G-Kermit converts the record format to thecommon one that is defined for the Kermit protocol, namely lines terminatedby carriage return and linefeed (CRLF); the receiver converts the CRLFs towhatever line-end or record-format convention is used on its platform.  Whenreceiving files in text mode, G-Kermit simply strips carriage returns,leaving only a linefeed at the end of each line, which is the UNIXconvention..PPWhen receiving files, the sender's transfer mode (text or binary)predominates if the sender gives this information to G-Kermit in a KermitFile Attribute packet, which of course depends on whether your terminalemulator's Kermit protocol has this feature.  Otherwise, if you gave a -i or-T option on the gkermit command line, the corresponding mode is used;otherwise the default mode (binary) is used..PPFurthermore, when either sending or receiving, G-Kermit and your terminalemulator's Kermit can inform each other of their OS type (UNIX in G-Kermit'scase).  If your emulator supports this capability, which is called"automatic peer recognition", and it tells G-Kermit that its platform isalso UNIX, G-Kermit and the emulator's Kermit automatically switch intobinary mode, since no record-format conversion is necessary in this case.Automatic peer recognition is disabled automatically if you include the -i(image) or -T (text) option..PPWhen sending, G-Kermit sends all files in the same mode, text or binary.There is no automatic per-file mode switching.  When receiving, however,per-file switching occurs automatically based on the incoming Attributepackets, if any (explained below), that accompany each file..PP.SS PATHNAMES.PPWhen SENDING a file, G-Kermit obtains the filenames from the command line.It depends on the shell to expand metacharacters (wildcards and tilde)..PPG-Kermit uses the full pathname given to find and open the file, but thenstrips the pathname before sending the name to the receiver.  For example:.nf.sp  $ gkermit -s /etc/hosts.sp.firesults in the receiver getting a file called "HOSTS" or "hosts" (thedirectory part, "/etc/", is stripped)..PPHowever, if a pathname is included in the -a option, the directory partis not stripped:.nf.sp  $ gkermit -s /etc/hosts -a /tmp/hosts.sp.fiThis example sends the /etc/hosts file but tells the receiver that its nameis "/tmp/hosts".  What the receiver does with the pathname is, of course, upto the receiver, which might have various options for dealing with incomingpathnames..PPWhen RECEIVING a file, G-Kermit does NOT strip the pathname.  If theincoming filename includes a path, G-Kermit tries to store the file in thespecified place.  If the path does not exist, the transfer fails.  Theincoming pathname can, of course, be overridden with the -a option..PP.SS FILENAME CONVERSION.PPWhen sending a file, G-Kermit normally converts outbound filenames tocommon form: uppercase, no more than one period, and no funny characters.So, for example, gkermit.tar.gz would be sent as GKERMIT_TAR.GZ..PPWhen receiving a file, if the name is all uppercase, G-Kermit converts itto all lowercase.  If the name contains any lowercase letters, G-Kermitleaves the name alone..PPIf the automatic peer recognition feature is available in the terminalemulator, and G-Kermit recognizes the emulator's platform as UNIX, G-Kermitautomatically disables filename conversion and sends and accepts filenamesliterally..PPYou can force literal filenames by including the -P option on the commandline..PP.SS FILENAME COLLISIONS.PPWhen G-Kermit receives a file whose name is the same as that of an existingfile, G-Kermit "backs up" the existing file by adding a unique suffix to itsname.  The suffix is ".~n~", where n is a number.  This kind of backup suffixis compatible with GNU EMACS and various other popular applications..PPTo defeat the backup feature and have incoming files overwrite existingfiles of the same name, include the -w (writeover) option on the commandline..PP.SH RETURN VALUESG-Kermit resturns an exit status code of 0 if all actions succeededand 1 if any actions failed..PP.SH IMPLEMENTATION NOTESG-Kermit is designed to be small, portable, and stable, and is intended foruse only on the "far end" of a connection; it does not make connectionsitself, although it can be used as an external protocol by other programs thatdo make connections.  To keep it small and stable, it does not include slidingwindows, a command or scripting language or character-set translation.  Tokeep it portable and stable, it avoids use of system services that are notstandardized across all UNIX varieties and therefore, in particular, does notsupport file timestamps, internal wildcard expansion, and other features thatare not implemented consistently (or at all) across all UNIXes..PP.SH ENVIRONMENTA GKERMIT environment variable may be defined (for example in your shellprofile) to include G-Kermit command-line options; these are processed byG-Kermit before any options that are specified on the command line, andtherefore are overriden by command-line options..PP.SH DIAGNOSTICSIf an error occurs during filetransfer G-Kermit sends an error packet to your terminal emulator to cancelthe transfer; an appropriate error message should be displayed on yourscreen..PP.SH ERRORSFile transfers can fail for a number of reasons:.sp.in +0.5i.ll -0.5i.ta +0.2i.ti -0.2i\(bu	Lack of read access to a source file..ti -0.2i\(bu	Lack of write access to a target directory..ti -0.2i\(bu	Lack of adequate flow control..ti -0.2i\(bu	Use of streaming on an unreliable connection..ti -0.2i\(bu	Excessive unprefixing of control characters..ti -0.2i\(bu	Sending bare 8-bit data on a 7-bit connection..ti -0.2i\(bu	Packets too long for receiver's buffers..ti -0.2i\(bu	Timeout interval too short for connection..ti -0.2i.ll +0.5i.in -0.5i.fi.spand many others; these are covered in the references..PP.SH REFERENCES.PPThe Kermit protocol is specified in "Kermit, A File Transfer Protocol" byFrank da Cruz, Digital Press (1987).  A correctness proof of the Kermitprotocol appears in "Specification and Validation Methods", edited by EgonBoerger, Oxford University Press (1995).  "Using C-Kermit" by Frank da Cruzand Christine M. Gianone, Digital Press (1997, or later edition) explains manyof the terms and techniques referenced here in case you are not familiar withthem, and also includes tutorials on data communications, extensivetroubleshooting and performance tips, etc.  Various other books on Kermit areavailable from Digital Press.  Online resources include:.nf.sp  Web:   http://www.columbia.edu/kermit/  FTP:   ftp://kermit.columbia.edu/kermit/g/  News:  comp.protocols.kermit.misc  Email: kermit-support@columbia.edu.fi.spAlso see the README file distributed with G-Kermit for further detail.  Itcan also be found at ftp://kermit.columbia.edu/kermit/g/README..PP.SH BUGSThe speed of a file transfer depends not only on the speed of the twocomputers involved and the characteristics of the connection, but also on thecapabilities and configuration of the two Kermit programs.  Kermit is a fastand reliable protocol, but not all implementations of it are necessarily fastor reliable..PPNonstreaming transfers on a TCP/IP connection might be inordinately slowif one or both of the TCP/IP stacks uses the Nagle or Delayed ACK tricks.Streaming is used automatically if the other Kermit supports it..PPWhen receiving files in text mode, G-Kermit strips all carriage returns,even if they aren't followed by linefeed..PPA backups files are not guaranteed to have the highest number in theirbackup suffix..PP.SH AUTHORFrank da Cruz, the Kermit Project, Columbia University, New York City,December 1999..br

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -