📄 xc.nro
字号:
.ds ]V version 4.3 JPRadley 11 Sep 1993.tm.tm xc.nro \*(]V.tm.ta 4 4 4 4 4 4 4 4.if n .po 0.if n .nr LL 7.9i.ll \n(LLu.lt \n(LLu.TH XC 1 "24 Nov 1996" "Linux" "Linux Programmer's Manual".SH Namexc \- communications program .SH Syntax.B xc.RB [ -l device].RB [ -s script\ |.BR -t ] .RB [ -w\ ].RB [ -p\ ].SH Description.B Xccalls out over a serial port to another computer. It can manage an interactivesession or be called from.BR cron (8).It has various means for transferring files between computers, and can bepartially or totally under the control of scripts..B Xcstarts up by reading the file .IR xc.init ,which is sought for in this order: in "XC_PATH", in the current directory,in your.I HOMEdirectory, or in a default directory defined at compile time( for Linux /usr/local/lib/xc/xc.init ). This startupfile may contain any of the valid.I SETcommands described below. .B Xcthen displays the current settings, and presents an.I <XC>prompt, unless either the \fB-t\fR or \fB-s\fR option was present..SS \fIOptions\fR.TP 9.BI -l deviceUse the specified .IR device ,which need not be the full pathname, e.g. "/dev/cua1" or "cua1" areequally acceptable.The line could either be directly connected to another computer, or have amodem on it. In either case (if a value was defined for DIDO at compile time),.B xcattempts to suspend a.BR getty (M)process that might be on that line, and then use the.BR uucp (C).I LCK..filemechanism to lock the line..TP.BI -s scriptExecute the specified.I scriptafter program startup..TP.B -tGo directly to terminal mode. The default is to go to command mode on programstartup. This option is incompatible with the .B -soption..TP.B -wDisables call waiting for duration of each connection..TP.B -pUse pulse dialing instead of touch tone. .SS \fIEnvironment\fRIf the environment contains a variable called "MODEM", then the valueof that variable will be the default device. As with the.B -lflag, this need not be thefull pathname. To set such a variable, in the Bourne shell, you might say:.IPMODEM=cua1; export MODEM.Por, in the C shell,.IPsetenv MODEM cua1.PIf the environment contains a variable called "BYEcuax", where "cuax"stands for the basename of the modem line selected either by the MODEMvariable or by the "-l" command option, then the value of that variablewill be sent to the modem when the program terminates. This is usefulfor setting the modem back to some preselected state. Example:.IPBYEcua1=ATZ ; export BYEcua1.PWhatever string is contained in the "Byexxxxx" variable will besent to the modem preceded and followed by a carriage-return.Newer modems can be preset to revert to a predetermined state when theDTR signal of the computer is dropped, and so would not need to availthemselves of this feature. Furthermore,.B gettyprograms which have been suspended, and which restart as.B xcexits, will reset a modem using dialers or chat scripts referred to in the/usr/lib/uucp/Devices file.Note that under Linux the proper device for call-out is a "cua"device and *NOT* a "tty" device. A "cua" device can point to thesame port as a "tty" device but the kernel handles call-outdevices differently. The "cua" devices use a major number of 5whereas the "tty" devices use a major number of 4. If you don'tcurrently have a "cua" device in your /dev directory, you canmake them with these commands: mknod /dev/cua0 c 5 64 cua0 mknod /dev/cua1 c 5 65 cua1 mknod /dev/cua2 c 5 66 cua2 etc ... etc ... The environment may contain a variable called "XC_PATH", consistingof colon separated absolute paths to directories. If this variable is set to,say, "/usr/joe/xc:/usr/lib/xc", then those two directories are thefirst places searched for any scripts..SS \fICommand Mode\fRWhen entering characters in command mode (that is, at the .I <XC>prompt), control characters echo as ^x, where "x" is the control character thatwas entered. Backspacing (using whatever key is defined in the currentenvironment) backspaces over both positions of the displayed control character,as expected. An "interpreted" key can be added in a manner similar to that of.BR vi (C);simply type ^V followed by the character to insert (backspace, delete,carriage return, or newline).The following commands are available at the.I <XC>command prompt:.TStab(@);l1B lw(56) .ccis@T{Respond to an ENQ signal for a CIS B-Plus protocol transfer. This command isused for both uploading and downloading from CompuServe.T}ddial@T{Enter the dial directory. Returns to the \fI<XC>\fRprompt if exited without dialing, but returns to terminal mode afterdialing or running a script.T}s \fIfilescript \fIfile\fR@T{Execute \fIfile\fR, which contains appropriate \fBxc\fRscript commands. Returns to terminal mode when the script is complete.T}rx \fIfile\fR@T{(XMODEM binary receive) Receive \fIfile\fR from the remote system.Note that packet size and checksum/crc is automatically negotiatedwith the sender. Xc will always try to negotiate crc and 1K bytepacket size first. T}rg \fIfile\fR@T{( 1K XMODEM-G streaming binary receive) Receive \fIfile\fR from the remotesystem. This mode is very fast because the receiver does not acknowledge packets which are successfully received.This protocol should only be used overextremely clean lines or with error correcting modems. Hardware flowcontrol should be enabled. Packets are protected with a 16-bit crc.However, when an error is detected by the receiver the transfer is aborted because this protocol does not provide for error recovery.T}ry @T{(YMODEM binary receive) Receive files from the remote system.This protocol is not invoked with any arguments which makes itvery convenient to use. The YMODEM protocolautomatically receives multiple files preserving file name, size,date, and permissions. YMODEM normally uses crc error checkingand 1K packet sizes. If the receiver detects an error in a packet,it will tell the sender to re-send the packet.T}ryg @T{(YMODEM-G binary streaming receive) Receive files from the remotesystem. This protocol is not invoked with any arguments which makesit very convenient to use. It is similar to the plain YMODEM protocol,but correctly received packets are not acknowledged. This provides forstreaming operation and very fast file transfers. YMODEM-G uses crcerror checking and 1K packet sizes. However, like XMODEM-G, when anerror is detected, the transfer is aborted. There is no attempt aterror recovery. Therefore, this protocol is best used over extremelyclean lines or with error correcting modems. Hardware flow controlshould be enabled. YMODEM-G is as fast, perhaps a bit faster thanZMODEM.T}so \fIfile\fR@( 1K XMODEM binary send)sx \fIfile\fR@T{( 128 byte XMODEM binary send) Send \fIfile\fR to the remote system.Note that for send mode, packet size depends on whether 'so' or 'sx'is invoked. However, checksum/crc is automatically negotiatedwith the remote. Xc will always try to negotiate crc error checkingfirst. When in 'so' mode, if there are fewer than 896 bytes leftat the end off a file transmission, packet size will automaticallyswitch to 128 bytes to avoid excessive file size padding. Note that1K XMODEM protocol is sometimes known as "old YMODEM". T}sg \fIfile\fR@T{( 1K XMODEM-G streaming binary send) Send \fIfile\fR to the remotesystem. This mode is very fast because it does not wait for packetacknowledgement from the receiver. Consequently, this protocol shouldonly be used over extremely clean lines or with error correctingmodems. Hardware flow control should be enabled. Packets are protectedwith a 16-bit crc. But when an error is detected by the receiver thetransfer is aborted because this protocol does not provide for errorrecovery.T}sy \fIfiles\fR@T{(YMODEM binary send) Batch send \fIfiles\fR to the remote system.YMODEM allows multiple files to be specifed on the command linewhich makes it very convenient to use. The YMODEM protocolautomatically sends multiple files preserving file name, size,date, and permissions. YMODEM normally uses crc error checkingand 1K packet sizes.T}syg \fIfiles\fR@T{(YMODEM-G binary send) Streaming protocol, batch send \fIfiles\fR to theremote system. YMODEM-G is similar to plain YMODEM with the exceptionthat YMODEM-G does not wait for acknowledgement before sending thenext packet. This streaming technique allows for very fast filetransfers. The YMODEM-G protocol automatically sends multiple filespreserving file name, size, date, and permissions. YMODEM-G uses crcerror checking and 1K packet sizes. Note that with the YMODEM-Gprotocol when the receiver detects an error it will abort thetransfer. Therefore YMODEM-G is best used over extermely clean linesor with error correcting modems. Hardware flow control should beenabled.T}rt \fIfile\fR@(obsolete XMODEM receive mode)st \fIfile\fR@T{(obsolete XMODEM send mode) receive/transmit "text" \fIfile\fR from/tothe remote system. This mode is rarely used nowadays and shouldbe avoided. Unix systems generally make no distinction between"binary" and "text" files. Use 'rx' or 'so' or 'sx' instead.Historically, this mode was primarily used on early CP/M systems.T}set \fR[\fIoptions\fR]@T{Display or set the transmission parameters used by \fBxc\fR. See below.T}tterm@Enter terminal mode.xqexitquit@Exit program. Return to invoking program/shell.hhangup@Hang-up the modem.%p \fIlocal\fR_\fIname\fR@T{[\fIremote_name\fR] Transmit (put) a file to a remote Unix system. This commanduses standard Unix utilities on the other end. \fIRemote_name\fR defaults tothe same pathname as \fIlocal_name\fR if not otherwise specified.T}%t \fIremote\fR_\fIname\fR@T{[\fIlocal_name\fR] Receive (take) a file from a remote Unix system. Thiscommand uses standard Unix utilities on the other end. \fILocal_name\fRdefaults to the same pathname as \fIremote_name\fR if not otherwise specified.T}?help@T{Displays a brief summary of \fBxc\fR commands, the SET options, andterminal-escape commands.T}.TE.P[Note: a compile-time option can disable the following three options toprevent any access to shells or other programs outside of.BR xc .].TStab(@);l6B lw(56) .! \fIcommand\fR@T{Execute the specified \fIcommand\fR as a child process. If \fIcommand\fR isomitted, execute a local interactive shell.(A space is required between the \fB!\fR and the \fIcommand\fR.)T}!!@Re-execute the last shell command string. $ \fIcommand\fR@T{Execute a shell \fIcommand\fR with stdin and stdout redi\%rected to themodem port. This effectively puts the computer into a "host" mode.(A space is required between the \fB$\fR and the \fIcommand\fR.)Note: this is usually used when invoking external protocols such asrz/sz ZMODEM from the command line (i.e. "$ sz foobar.tar.gz").T}.TE.SS \fIUsing the SET Command\fRThe.I SETcommand is used to display and set/reset.BR xc 'stunable parameters. Any of these commands may be placed in the.I .xcfile which is read upon starting up.BR xc .Used alone,.I SETdisplays.BR xc 'scurrent parameters.The following parameters can be set (note that except in the case of.IR name s,these commands are case-\fIin\fRsensitive, and that there alternative formsof the commands shown on the XC help screen):.TStab(@) ;l1 lw(54) .set auto on|off@T{Sets the auto-capture feature. When entering terminal mode, capturingcommences without the necessity to manually request it.T}set bps \fIvalue\fRset baud \fIvalue\fR@T{Set the desired bits/second rate. Supported bps rates are 300, 1200, 2400,9600 (and, if included at compile time, 19200 and 38400).T}set cfile \fIname\fR@Set the \fIname\fR of the capture file.set cis on|off@T{Set response to a CompuServe file transfer request (<ENQ>). An "on" valuespecifies that when in terminal mode, an <ENQ> character will launch a CISB-Plus protocol transfer. This parameter should be set "off" when notconnecting to CompuServe, as phone line noise may cause a bogus file transferrequest.T}set cr on|off@T{In uploads using B-Plus protocol, setting this option "on" will insert acarriage-return after each newline in an ASCII file. If you expect your ASCIIupload to be captured by DOS users, it is best to set cr "on". If your ASCIIupload is meant strictly for Unix users, then you may set cr "off".The B-Plus protocol implementation used by \fBxc\fRwill always strip end-of-line carriage-returns from incoming ASCII files.T}set dir \fIname\fR@Set the current working directory.set hdplx on|off@T{Sets the half-duplex flag. If this flag is set, then all characters typed atthe keyboard while in terminal mode will be echoed to the screen as well assent to the modem line. Useful for remote systems that don't echo characters.T}set menu on|off@T{By default, a one-line menu is displayed above the \fI<XC>\fR prompt toremind the user of options most frequently chosen at this point:"[d]ial directory [t]erminal mode [q]uit [s]cript [?]help".Setting the option "off" turns off this display.T}set nl on|off@T{If this option is set "on", then newlines are sent ascarriage-returns. If this option is set "off", then newlines are sent asnewlines (carriage-returns are in any case always sent as carriage-returns).This option applies to input from the keyboard, or from a disk file using the"\fBXCAPE\fR \fBF\fR" facility or a script "type" command (See below).This option has no effect on built-in XMODEM or B-Plus protocol transmissions,and has no effect on incoming data.T}set pfile \fIname\fR@Set the \fIname\fR of the phone directory.set proto \fIvalue\fR@T{This refers to the serial port character protocol, not to a file transferprotocol. The possible values are 8N1, 7E2, or 7O2, (case insensitive) which
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -