Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
sb(1)
Edit
PageHistory
Diff
Info
LikePages
SZ !!!SZ NAME SYNOPSIS DESCRIPTION SECURITY ENVIRONMENT EXAMPLES ERROR MESSAGES SEE ALSO VMS VERSION FILES TESTING FEATURE BUGS ---- !!NAME sx, sb, sz - XMODEM, YMODEM, ZMODEM file send !!SYNOPSIS sz [[-__+8abdefkLlNnopqTtuvyY__] ''file ...'' sb [[-__adfkqtuv__] ''file ...'' sx [[-__akqtuv__] ''file'' sz [[-__oqtv__] __-c COMMAND__ sz [[-__oqtv__] __-i COMMAND__ sz -TT !!DESCRIPTION __Sz__ uses the ZMODEM, YMODEM or XMODEM error correcting protocol to send one or more files over a dial-in serial port to a variety of programs running under PC-DOS, CP/M, Unix, VMS, and other operating systems. While ''rz'' is smart enough to be called from ''cu(1),'' very few versions of ''cu(1)'' are smart enough to allow ''sz'' to work properly. Unix flavors of Professional-YAM are available for such dial-out application. __Sz__ sends one or more files with ZMODEM protocol. ZMODEM greatly simplifies file transfers compared to XMODEM. In addition to a friendly user interface, ZMODEM provides Personal Computer and other users an efficient, accurate, and robust file transfer method. ZMODEM provides complete __END-TO-END__ data integrity between application programs. ZMODEM's 32 bit CRC catches errors that sneak into even the most advanced networks. Advanced file management features include !AutoDownload (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 of exact file date and length. Output from another program may be piped to __sz__ for transmission by denoting standard input with __ ls -l | sz - The program output is transmitted with the filename sPID.sz where PID is the process ID of the __sz__ program. If the environment variable __ONAME__ is set, that is used instead. In this case, the Unix command: ls -l | ONAME=con sz -ay - will send a -y__ option instructs the receiver to open the file for writing unconditionally. The __-a__ option causes the receiver to convert Unix newlines to PC-DOS carriage returns and linefeeds. __Sb__ batch sends one or more files with YMODEM or ZMODEM protocol. The initial ZMODEM initialization is not sent. When requested by the receiver, __sb__ supports __YMODEM-g__ with __YMODEM-g__ (Professional-YAM __g__ option) increases throughput over error free channels (direct connection, X.PC, etc.) by not acknowledging each transmitted sector. On Unix systems, 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 to the output dataset, and the modify time and file mode are set accordingly. __Sx__ sends a single ''file'' with __XMODEM__ or __XMODEM-1k__ protocol (sometimes incorrectly called __ If __sz__ is invoked with $SHELL set and iff that variable contains the string ''rsh'' , ''rbash'' or ''rksh'' (restricted shell), __sz__ operates in restricted mode. Restricted mode restricts pathnames to the current directory and PUBDIR (usually /usr/spool/uucppublic) and/or subdirectories thereof. The fourth form sends a single COMMAND to a ZMODEM receiver for execution. __Sz__ exits 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. __Sz__ exits 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 being eaten by the operating system. If __sz__ is invoked with stdout and stderr to different datasets, Verbose is set to 2, causing frame by frame progress reports to stderr. This may be disabled with the __q__ option. The meanings of the available options are: __-+, --append__ Instruct the receiver to append transmitted data to an existing file (ZMODEM only). __-2, --twostop__ use two stop bits (if possible). Do not use this unless you know what you are doing. __-8, --try-8k__ Try to go up to 8KB blocksize. This is incompatible with standard zmodem, but a common extension in the bbs world. (ZMODEM only). __--start-8k__ Start with 8KB blocksize. Like --try-8k. __-a, --ascii__ Convert NL characters in the transmitted file to CR/LF. This is done by the sender for XMODEM and YMODEM, by the receiver for ZMODEM. __-b, --binary__ (ZMODEM) Binary override: transfer file without any translation. __-B NUMBER, --bufsize NUMBER__ Use a readbuffer of __NUMBER__ bytes. Default ist 16384, which should be enough for most situations. If you have a slow machine or a bad disk interface or suffer from other hardware problems you might want to increase the buffersize. __-1__ or __auto__ use a buffer large enough to buffer the whole file. Be careful with this option - things normally get worse, not better, if the machine starts to swap. Using this option turns of memory mapping of the input file. This increases memory and cpu usage. __-c COMMAND, --command COMMAND__ Send COMMAND to the receiver for execution, return with COMMANDs exit status. __-C N, --command-tries N__ Retry to send command N times (default: 11). __-d, --dot-to-slash__ Change all instances of This option enables the __--full-path__ option. __--delay-startup N__ Wait __N__ seconds before doing anything. __-e, --escape__ Escape all control characters; normally XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped. Force the sender to rename the new file if a file with the same name already exists. __-f, --full-path__ Send Full pathname. Normally directory prefixes are stripped from the transmitted filename. This is also turned on with to __--dot-to-slash__ option. __-h, --help__ give help. __-i COMMAND, --immediate-command COMMAND__ Send COMMAND to the receiver for execution, return immediately upon the receiving program's successful recption of the command. __-k, --1k__ (XMODEM/YMODEM) Send files using 1024 byte blocks rather 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.) __-L N, --packetlen N__ Use ZMODEM sub-packets of length N. A larger N (32 __-m N, --min-bps N__ Stop transmission if BPS-Rate (Bytes Per Second) falls below N for a certain time (see --min-bps-time option). __-M N, --min-bps-time__ Used together with --min-bps. Default is 120 (seconds). __-l N, --framelen N__ Wait for the receiver to acknowledge correct data every __N__ (32 __ __-n, --newer__ (ZMODEM) Send each file if destination file does not exist. Overwrite destination file if source file is newer than the destination file. __-N, --newer-or-longer__ (ZMODEM) Send each file if destination file does not exist. Overwrite destination file if source file is newer or longer than the destination file. __-o, --16-bit-crc__ (ZMODEM) Disable automatic selection of 32 bit CRC. __-O, --disable-timeouts__ Disable read timeout handling. This makes lsz hang if the other side doesn't send anything, but increases performance (not much) and decreases system load (reduces number of system calls by about 50 percent). Use this option with care. __-p, --protect__ (ZMODEM) Protect existing destination files by skipping transfer if the destination file exists. __-q, --quiet__ Quiet suppresses verbosity. __-R, --restricted__ Restricted mode: restricts pathnames to the current directory and PUBDIR (usually /usr/spool/uucppublic) and/or subdirectories thereof. __-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 equals the length of the destination file. __-s HH:MM, --stop-at HH:MM__ Stop transmission at __HH__ hours, __MM__ minutes. Another variant, using __+N__ instead of __HH:MM,__ stops transmission in __N__ seconds. __-S, --timesync__ enable timesync protocol support. See timesync.doc for further information. This option is incompatible with standard zmodem. Use it with care. __--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. __-t TIM, --timeout TIM__ Change timeout to ''TIM'' tenths of seconds. __-T, --turbo__ Do not escape certain characters (^P, ^P|0x80, telenet escape sequence [[CR + @]). This improves performance by about 1 percent and shouldn't hurt in the normal case (but be careful - ^P might be useful if connected through a terminal server). __--tcp__ Try to initiate a TCP/IP connection. lsz will ask the receiving zmodem to open a TCP/IP connection. All handshaking (which address / port to use) will be done by the zmodem programs. You will normally not want to use this option as lrzsz is the only zmodem which understands what to do (private extension). You might want to use this option if the two programs are connected (stdin/out) over a slow or bad (not 8bit clean) network connection. Use of this option imposes a security risk, somebody else could connect to the port in between. See __SECURITY__ for details. __--tcp-client ADDRESS:PORT__ Act as a tcp/ip client: Connect to the given port. See __--tcp-server__ for more information. __--tcp-server__ Act as a server: Open a socket, print out what to do, wait for connection. You will normally not want to use this option as lrzsz is the only zmodem which understands what to do (private extension). You might want to use this if you have to use zmodem (for which reason whatever), and cannot use the __--tcp__ option of ''lsz'' (perhaps because your telnet doesn't allow to spawn a local program with stdin/stdout connected to the remote side). If you use this option you have to start ''lsz'' with the __--tcp-client ADDRESS:PORT__ option. ''lrz will print the address and port on startup.'' Use of this option imposes a security risk, somebody else could connect to the port in between. See __SECURITY__ for details. __-u__ Unlink the file after successful transmission. __-U, --unrestrict__ Turn off restricted mode (this is not possible if running under a restricted shell). __-w N, --windowsize N__ Limit the transmit window size to N bytes (ZMODEM). __-v, --verbose__ Verbose output to stderr. More v's generate more output. __-X, --xmodem__ use XMODEM protocol. __-y, --overwrite__ Instruct a ZMODEM receiving program to overwrite any existing file with the same name. __-Y, --overwrite-or-skip__ Instruct a ZMODEM receiving program to overwrite any existing file with the same name, and to skip any source files that do have a file with the same pathname on the destination system. __--ymodem__ use ZMODEM protocol. __-Z, --zmodem__ use ZMODEM protocol. !!SECURITY Restricted mode restricts pathnames to the current directory and PUBDIR (usually /var/spool/uucppublic) and/or subdirectories thereof, and disables remote command execution. Restricted mode is entered if the __R__ option is given or if lsz detects that it runs under a restricted shell or if the environment variable ZMODEM_RESTRICTED is found. Restricted mode can be turned of with the __U__ option if not running under a restricted shell. Use of the __--tcp-client__ or __--tcp-server__ options imposes a security risk, as somebody else could connect to the port before you do it, and grab your data. If there's strong demand for a more secure mode i might introduce some sort of password challenge. !!ENVIRONMENT __ZNULLS__ may be used to specify the number of nulls to send before a ZDATA frame. __SHELL__ lsz recognizes a restricted shell if this variable includes ''rsh'' or ''rksh'' __ZMODEM_RESTRICTED__ lrz enters restricted mode if the variable is set. __TMPDIR__ If this environment variable is set its content is used as the directory to place in the answer file to a __timesync__ request. __TMP__ Used instead of TMPDIR if TMPDIR is not set. If neither TMPDIR nor TMP is set /tmp will be used. !!EXAMPLES __ZMODEM File Transfer__ (Unix to DSZ/ZCOMM/Professional-YAM)__ % sz -a *.c__ This single command transfers all .c files in the current Unix directory with conversion (__-a__) to end of line conventions appropriate to the receiving environment. With ZMODEM !AutoDownload enabled, Professional-YAM and ZCOMM will automatically recieve the files after performing a security check. __% sz -Yan *.c *.h__ Send only the .c and .h files that exist on both systems, and are newer on the sending system than the corresponding version on the receiving system, converting Unix to DOS text format.__ $ sz -Yan file1.c file2.c file3.c foo.h baz.h__ (for VMS) __ZMODEM Command Download__ (Unix to Professional-YAM) cpszall:all sz -c This Makefile fragment uses __sz__ to issue commands to Professional-YAM to change current disk and directory. Next, __sz__ transfers the ''.me'' files from the $YD directory, commanding the receiver to overwrite the old files and to convert from Unix end of line conventions to PC-DOS conventions. The third line transfers some ''.exe'' files. The fourth and fifth lines command Pro-YAM to change directory and execute a PC-DOS batch file ''insms .'' Since the batch file takes considerable time, the __-i__ form is used to allow __sz__ to exit immediately. __XMODEM File Transfer__ (Unix to Crosstalk) % __sx -a foo.c ESC rx foo.c__ The above three commands transfer a single file from Unix to a PC and Crosstalk with ''sz'' translating Unix newlines to DOS CR/LF. This combination is much slower and far less reliable than ZMODEM. !!ERROR MESSAGES !!SEE ALSO rz(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 in the source file. !!VMS VERSION The VMS version does not support wild cards. Because of VMS DCL, upper case option letters muse be represented by \ 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. !!FILES 32 bit CRC code courtesy Gary S. Brown. sz.c, crctab.c, rbsb.c, zm.c, zmodem.h Unix source files sz.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). !!TESTING FEATURE The command Attn__ sequence error recovery by commanding errors with unterminated packets. The receiving program should complain five times about binary data packets being too long. Each time __sz__ is interrupted, it should send a ZDATA header followed by another defective packet. If the receiver does not detect five long data packets, the __Attn__ sequence is not interrupting the sender, and the __Myattn__ string in __sz.c__ must be modified. After 5 packets, __sz__ stops the __ !!BUGS Calling ''sz'' from most versions of cu(1) doesn't work because cu's receive process fights ''sz'' for characters from the modem. On at least one BSD system, sz would hang or exit when it got within a few kilobytes of the end of file. Using the Programs that do not properly implement the specified file transfer protocol may cause ''sz'' to '' 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 blocks to avoid extra padding. YMODEM programs use the file length transmitted at the beginning of the transfer to prune the file to the correct length; this may cause problems with source files that grow during the course of the transfer. This problem does not pertain to ZMODEM transfers, which preserve the exact file 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 used when input is from pipes instead of acknowledging frames each 1024 bytes. If no files can be opened, __sz__ sends a ZMODEM command to echo a suitable complaint; perhaps it should check for the presence of at least one accessible file before getting 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 the direction of high speed transmissson is reversed. The environment variable ZNULLS may be used to specify the number of nulls to send before a ZDATA frame. Values of 101 for a 4.77 mHz PC and 124 for an AT are typical. ----
One page links to
sb(1)
:
Man1s
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.