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

📄 lsz.1

📁 Debian Linux下的通讯程序
💻 1
字号:
'\"'\" Revision Level '\" Last Delta     04-21-88.TH SZ 1 2.6.1996 lrzsz-0.12b.SH NAMEsx, sb, sz \- XMODEM, YMODEM, ZMODEM file send.SH SYNOPSISsz.RB [\- +8abdefkLlNnopqTtuvyY ].I file ....brsb.RB [\- adfkqtuv ].I file ....brsx.RB [\- akqtuv ].I file.brsz.RB [\- oqtv ].B "-c COMMAND".brsz.RB [\- oqtv ].B "-i COMMAND".brsz -TT.SH DESCRIPTION.B Szuses the ZMODEM, YMODEM or XMODEM error correcting protocol to sendone or more files over a dial-in serial port to a variety of programs running underPC-DOS, CP/M, Unix, VMS, and other operating systems.While.I rzis smart enough to be called from.I cu(1),very few versions of.I cu(1)are smart enough to allow.I szto work properly.Unix flavors of Professional-YAM are available for such dial-out application..B Szsends one or more files with ZMODEM protocol.ZMODEMgreatly simplifies file transfers compared to XMODEM.In addition to a friendly user interface, ZMODEMprovides Personal Computer and other usersan efficient, accurate, and robust file transfer method.ZMODEM provides complete.B "END-TO-END"data integrity between application programs.ZMODEM's 32 bit CRC catches errorsthat sneak into even the most advanced networks.Advanced file management features includeAutoDownload (Automatic file Download initiated without user intervention),Display of individual and total file lengths and transmission time estimates,Crash Recovery,selective file transfers,and preservation ofexact file date and length.Output from another program may be piped to.B szfor transmission by denoting standard input with "-":.cels -l | sz -The program output is transmitted with the filename sPID.szwhere PID is the process ID of the.B szprogram.If the environment variable.B ONAMEis set, that is used instead.In this case, the Unix command:.cels -l | ONAME=con sz -ay -will send a "file" to the PC-DOS console display.The.B -yoption instructs the receiver to open the file for writing unconditionally.The.B -aoptioncauses the receiver to convert Unix newlines to PC-DOS carriage returnsand linefeeds..B Sbbatch sends one or more files with YMODEM or ZMODEM protocol.The initial ZMODEM initialization is not sent.When requested by the receiver,.B sbsupports.B YMODEM-gwith "cbreak" tty mode, XON/XOFF flow control,and interrupt character set to CAN (^X)..B YMODEM-g(Professional-YAM.B goption)increases throughput over error free channels(direct connection, X.PC, etc.)by not acknowledging each transmitted sector.On.SM Unixsystems, additional information about the file is transmitted.If the receiving program uses this information,the transmitted file length controls the exact number of bytes written tothe output dataset,and the modify time and file modeare set accordingly..B Sxsends a single.I filewith.B XMODEMor.B XMODEM-1kprotocol(sometimes incorrectly called "ymodem").The user must supply the file name to both sending and receiving programs.If.B szis invoked with $SHELL set and iff that variable contains thestring.I "rsh"or.I "rksh"(restricted shell),.B szoperates in restricted mode.Restricted mode restricts pathnames to the current directory andPUBDIR (usually /usr/spool/uucppublic) and/or subdirectoriesthereof.The fourth form sends a single COMMAND to a ZMODEM receiver for execution..B Szexits with the COMMAND return value.If COMMAND includes spaces or characters special to the shell,it must be quoted.The fifth form sends a single COMMAND to a ZMODEM receiver for execution..B Szexits as soon as the receiver has correctly received the command,before it is executed.The sixth form (sz -TT)attempts to output all 256 code combinations to the terminal.In you are having difficulty sending files,this command lets you see which character codes are beingeaten by the operating system.If.B szis invoked with stdout and stderr to different datasets,Verbose is set to 2, causing frame by frame progress reportsto stderr.This may be disabled with the.B qoption..PPThe meanings of the available options are:.PP.PD 0.TP.B \\\\(backslash). Force the next option letter to upper case..TP.B +Instruct the receiver to append transmitted data to an existing file(ZMODEM only)..TP .B 2use two stop bits (if possible). Do not use this unless you knowwhat you are doing..TP.B 8Use 8KB blocksize (incompatible with standard zmodem) (ZMODEM only)..TP.B aConvert NL characters in the transmitted file to CR/LF.This is done by the sender for XMODEM and YMODEM, by the receiverfor ZMODEM..TP.B b(ZMODEM) Binary override: transfer file without any translation..TP.B "c COMMAND"Send COMMAND to the receiver for execution, return with COMMAND\'s exit status..TP.B C NRetry to send command N times (default: 11)..TP.B dChange all instances of "." to "/" in the transmitted pathname.Thus, C.omenB0000 (which is unacceptable to MSDOS or CP/M)is transmitted as C/omenB0000.If the resultant filename has more than 8 characters in the stem,a "." is inserted to allow a total of eleven.This option enables the .B foption..TP.B eEscape all control characters;normally XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped..TP.B fSend Full pathname.Normally directory prefixes are stripped from the transmittedfilename.This is also turned on with to .B doption..TP.B hgive help..TP.B "i COMMAND"Send COMMAND to the receiver for execution, return Immediatelyupon the receiving program's successful recption of the command..TP.B k(XMODEM/YMODEM) Send files using 1024 byte blocksrather than the default 128 byte blocks.1024 byte packets speed file transfers at high bit rates.(ZMODEM streams the data for the best possible throughput.).TP.B "L N"Use ZMODEM sub-packets of length N.A larger N (32 <= N <= 1024) gives slightly higher throughput,a smaller N speeds error recovery.The default is 128 below 300 baud, 256 above 300 baud, or 1024 above 2400 baud..TP.B "l N"Wait for the receiver to acknowledge correct data every.B N(32 <= N <= 1024)characters.This may be used to avoid network overrun when XOFF flow control is lacking..TP.B n(ZMODEM) Send each file ifdestination file does not exist.Overwrite destination file ifsource file is newer than the destination file..TP.B N(ZMODEM) Send each file ifdestination file does not exist.Overwrite destination file ifsource file is newer or longer than the destination file..TP.B o(ZMODEM) Disable automatic selection of 32 bit CRC..TP.B ODisable read timeout handling. This makes lsz hang if the other sidedoesn't send anything, but increases performance (not much) anddecreases system load (reduces number of system calls by about 50percent).Use this option with care..TP.B p(ZMODEM) Protect existing destination files by skipping transfer if thedestination file exists..TP.B qQuiet suppresses verbosity..TP.B RRestricted mode: restricts pathnames to the current directory andPUBDIR (usually /usr/spool/uucppublic) and/or subdirectoriesthereof..TP.B r(ZMODEM) Resume interrupted file transfer.If the source file is longer than the destination file,the transfer commences at the offset in the source file that equalsthe length of the destination file..TP.B Senable timesync protocol support. See timesync.doc for further information.This option is incompatible with standard zmodem. Use it with care..TP.B "t tim"Change timeout to.I timtenths of seconds..TP.B uUnlink the file after successful transmission..TP.B UTurn off restricted mode (this is not possible if running under a restricted shell)..TP.B "w N"Limit the transmit window size to N bytes (ZMODEM)..TP.B vVerbose output to stderr. More v's generate more output..TP.B yInstruct a ZMODEM receiving program to overwrite any existing filewith the same name..TP.B YInstruct a ZMODEM receiving program to overwrite any existing filewith the same name,and to skip any source files that do have a file with the samepathname on the destination system..PD.SH SECURITYRestricted mode restricts pathnames to the current directoryand PUBDIR (usually /var/spool/uucppublic)and/or subdirectories thereof, and disables remote commandexecution.Restricted mode is entered if the .B Roption is given or if lsz detects that it runs under a restrictedshell or if the environment variable ZMODEM_RESTRICTED is found.Restricted mode can be turned of with the .B Uoption if not running under a restricted shell..SH ENVIRONMENT.TP.B ZNULLSmay be used to specify the number of nulls to send before a ZDATA frame..TP.B SHELLlsz recognizes a restricted shell if this variable includes.I "rsh"or.I "rksh".TP.B ZMODEM_RESTRICTEDlrz enters restricted mode if the variable is set..TP.B TMPDIRIf this environment variable is set its content is used as the directory to place in the answer file to a .B timesync request..B TMPUsed instead of TMPDIR if TMPDIR is not set. If neither TMPDIR norTMP is set /tmp will be used..SH EXAMPLES.ne 7.B "ZMODEM File Transfer"(Unix to DSZ/ZCOMM/Professional-YAM).br.B "% sz \-a *.c".brThis single command transfers all .c files in the current Unix directorywith conversion.RB ( \-a )to end of line conventions appropriate to the receiving environment.With ZMODEM AutoDownload enabled, Professional-YAM  and ZCOMMwill automatically recievethe files after performing a security check..br.B "% sz \-Yan *.c *.h".brSend only the .c and .h files that exist on both systems,and are newer on the sending system than thecorresponding version on the receiving system, converting Unix toDOS text format..br.B$ sz -\\Yan file1.c file2.c file3.c foo.h baz.h.R(for VMS).br.B "ZMODEM Command Download"(Unix to Professional-YAM).br cpszall:all    sz \-c "c:;cd /yam/dist"    sz \-ya $(YD)/*.me    sz \-yqb y*.exe    sz \-c "cd /yam"    sz \-i "!insms".brThis Makefile fragment uses.B szto issue commands to Professional-YAM to change current disk and directory.Next,.B sztransfers the.I .mefiles from the $YD directory, commanding the receiver to overwrite the old filesand to convert from Unix end of line conventions to PC-DOS conventions.The third line transfers some.I .exefiles.The fourth and fifth lines command Pro-YAM tochange directory and execute a PC-DOS batch file.I insms .Since the batch file takes considerable time, the.B "\-i"form is used to allow.B szto exit immediately..B "XMODEM File Transfer"(Unix to Crosstalk).br%.B "sx \-a foo.c".br.B "ESC".br.B "rx foo.c".brThe above three commands transfer a single filefrom Unix to a PC and Crosstalk with.I sztranslating Unix newlines to DOS CR/LF.This combination is much slower and far less reliable than ZMODEM..SH ERROR MESSAGES"Caught signal 99"indicates the program was not properly compiled,refer to "bibi(99)" in rbsb.c for details..SH SEE ALSOrz(omen),ZMODEM.DOC,YMODEM.DOC,Professional-YAM,crc(omen),sq(omen),todos(omen),tocpm(omen),tomac(omen),yam(omen)Compile time options required for various operating systems are described inthe source file..SH "VMS VERSION"The VMS version does not support wild cards.Because of VMS DCL, upper case option letters muse be representedby \\ proceding the letter.The current VMS version does not support XMODEM, XMODEM-1k, or YMODEM.VMS C Standard I/O and RMS may interact to modify the file contents..SH FILES32 bit CRC code courtesy Gary S. Brown.sz.c, crctab.c, rbsb.c, zm.c, zmodem.h Unix source filessz.c, crctab.c, vrzsz.c, zm.c, zmodem.h, vmodem.h, vvmodem.c,VMS source files./tmp/szlog stores debugging output (sz -vv)(szlog on VMS)..SH "TESTING FEATURE"The command "sz -T file"exercises the.B Attnsequence error recovery by commandingerrors with unterminated packets.The receiving program should complain five times aboutbinary data packets being too long.Each time.B szis interrupted,it should send a ZDATA header followed by another defective packet.If the receiver does not detect five long data packets,the.B Attnsequence is not interrupting the sender, and the.B Myattnstring in.B sz.cmust be modified.After 5 packets,.B szstops the "transfer" andprints the total number of characters "sent" (Tcount).The difference between Tcount and 5120 represents the number of charactersstored in various buffers when the Attn sequence is generated..SH BUGSCalling.I szfrom most versions of cu(1) doesn't work because cu's receive processfights.I szfor characters from the modem.On at least one BSD system, sz would hang or exit when it got withina few kilobytes of the end of file.Using the "-w 8192" flag fixed the problem.The real cause is unknown, perhaps a bug in the kernel TTY output routines.Programs that do not properly implement the specified file transfer protocolmay cause.I szto "hang" the port for a minute or two.This problem is corrected by usingZCOMM, Pro-YAM, or other program with a correct implementationof the specified protocol.Many programs claiming to support YMODEM only support XMODEM with 1k blocks,and they often don't get that quite right.XMODEM transfers add up to 127 garbage bytes per file.XMODEM-1k and YMODEM-1k transfers use 128 byte blocksto avoid extra padding.YMODEM programs use the file length transmitted at the beginning of thetransfer to prune the file to the correct length; this may cause problems withsource files that grow during the course of the transfer.This problem does not pertain to ZMODEM transfers, which preserve the exactfile length unconditionally.Most ZMODEM options are merely passed to the receiving program;some do not implement all these options.Circular buffering and a ZMODEM sliding window should be usedwhen input is from pipes instead of acknowledging frames each 1024 bytes.If no files can be opened,.B szsends a ZMODEM command to echo a suitable complaint;perhaps it should check for the presence of at least one accessible file beforegetting hot and bothered.The test mode leaves a zero length file on the receiving system.A few high speed modems have a firmware bug that drops characters when thedirection of high speed transmissson is reversed.The environment variable ZNULLS may be used to specify the number of nulls tosend before a ZDATA frame.Values of 101 for a 4.77 mHz PC and 124 for an AT are typical.

⌨️ 快捷键说明

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