📄 lsz.1
字号:
Use this option with care..TP.B "-p, --protect"(ZMODEM) Protect existing destination files by skipping transfer if thedestination file exists..TP.B "-q, --quiet"Quiet suppresses verbosity..TP.B "-R, --restricted"Restricted mode: restricts pathnames to the current directory andPUBDIR (usually /usr/spool/uucppublic) and/or subdirectoriesthereof..TP.B "-r, --resume"(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 "-s HH:MM, --stop-at HH:MM"Stop transmission at.B HH hours, .B MMminutes. Another variant, using .B +N instead of .B HH:MM,stops transmission in.B Nseconds..TP.B "-S, --timesync"enable timesync protocol support. See timesync.doc for further information.This option is incompatible with standard zmodem. Use it with care..TP.B "--syslog[=off]"turn syslogging on or off. the default is set at configure time.This option is ignored if no syslog support is compiled in..TP.B "-t TIM, --timeout TIM"Change timeout to.I TIMtenths of seconds..TP.B "-T, --turbo"Do not escape certain characters (^P, ^P|0x80, telenet escape sequence[CR + @]). This improves performance by about 1 percent and shouldn'thurt in the normal case (but be careful - ^P might be useful if connectedthrough a terminal server)..TP.B "-u"Unlink the file after successful transmission..TP.B "-U, --unrestrict"Turn off restricted mode (this is not possible if running under a restricted shell)..TP.B "-w N, --windowsize N"Limit the transmit window size to N bytes (ZMODEM)..TP.B "-v, --verbose"Verbose output to stderr. More v's generate more output..TP.B "-X, --xmodem"use XMODEM protocol..TP.B "-y, --overwrite"Instruct a ZMODEM receiving program to overwrite any existing filewith the same name..TP.B "-Y, --overwrite-or-skip"Instruct 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..TP.B "--ymodem"use ZMODEM protocol..TP.B "-Z, --zmodem"use ZMODEM protocol..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 + -