MAN page from OpenSuSE 12.X rzsz-0.12.20-991.1.2.x86_64.rpm
Section: User Commands (1)
rx, rb, rz - XMODEM, YMODEM, ZMODEM (Batch) file receive
This program uses error correcting protocols to receivefiles over a dial-in serial port from a variety of programs running underPC-DOS, CP/M,Unix,
and other operating systems.It is invoked from a shell promptmanually, or automatically as a result of an"sz file ..." command given to the calling program.
Whilerzis smart enough to be called fromcu(1),very few versions ofcu(1)are smart enough to allowrzto work properly.Unix flavors of Professional-YAM are available for such dial-out application.
Rz(Receive ZMODEM)receives files with the ZMODEM batch protocol.Pathnames are supplied by the sending program,and directories are made if necessary (and possible).Normally, the"rz" command is automatically issued by the calling ZMODEM program,but some defective ZMODEM implementations may require startingrzthe old fashioned way.
Rbreceives file(s) with YMODEM,accepting either standard 128 byte sectors or1024 byte sectors(YAM sb-koption).The user should determine whenthe 1024 byte block lengthactually improves throughput without causing lost dataor even system crashes.
If True YMODEM (Omen Technology trademark) file information (file length, etc.)is received,the file length controls the number of bytes written tothe output dataset,and the modify time and file mode(iff non zero)are set accordingly.
If no True YMODEM file information is received,slashes in the pathname are changed to underscore,and any trailing period in the pathname is eliminated.This conversion is useful for files received from CP/M systems.With YMODEM, each file name is converted to lower caseunless it contains one or more lower case letters.
Rxreceives a singlefilewith XMODEM or XMODEM-1k protocol.The user should determine whenthe 1024 byte block lengthactually improves throughput without causing problems.The user must supply the file name to both sending and receiving programs.Up to 1023 garbage characters may be added to the received file.
Rzmay be invoked asrzCOMMAND(with an optional leading - as generated by login(1)).For each received file,rzwill pipe the file to ``COMMAND filename''where filename is the name of the transmitted filewith the file contents as standard input.
Each file transfer is acknowledged when COMMAND exits with 0 status.A non zero exit status terminates transfers.
A typical use for this form isrzrmailwhich calls rmail(1)to post mail to the user specified by the transmitted file name.For example, sending the file "caf" from a PC-DOS system torzrmailon aUnixsystemwould result in the contents of the DOS file "caf" being mailed to user "caf".
On someUnixsystems, the login directory must contain a link toCOMMAND as login sets SHELL=rsh which disallows absolutepathnames.If invoked with a leading ``v'',rzwill be verbose (see voption).The following entry works forUnixSYS III/V:rzrmail::5:1::/bin:/usr/local/rzrmail
If the SHELL environment variable includesrsh
will not accept absolute pathnamesor references to a parent directory,will not modify an existing file, andremoves any files received in error.
Ifrzis 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 theqoption.
The meanings of the available options are:
- -+, --append
- append received data to an existing file (ZMODEM, ASCII only).
- -a, --ascii
- Convert files toUnixconventions by stripping carriage returns and all charactersbeginning with the first Control Z (CP/M end of file).
- -b, --binary
- Binary(tell it like it is)file transfer override.
- -B NUMBER, --bufsize NUMBER
- Buffer NUMBERbytes before writing to disk. Default ist 32768, which should be enoughfor most situations. If you have a slow machine or a bad disk interfaceor suffer from other hardware problems you might want to increasethe buffersize.-1orautouse a buffer large enough to buffer the whole file. Be careful with thisoptions - things normally get worse, not better, if the machine startsto swap.
- -c, --with-crc
- XMODEM only. Use 16 bit CRC (normally a one byte checksum is used).
- -C, --allow-remote-commands
- allow remote command execution (insecure). This allows the sender to execute an arbitrary command throughsystem() orexecl(). Default is to disable this feature (?). This option is ignoredif running in restricted mode.
- -D, --null
- Output file data to /dev/null; for testing.(Unix only)
- --delay-startup N
- Wait Nseconds before doing anything.
- -e, --escape
- Force sender to escape all control characters;normally XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
- -E, --rename
- Rename incoming file if target filename already exists. The new filename will have a dot and a number (0..999) appended.
- -h, --help
- give help screen.
- -m N, --min-bps N
- Stop transmission if BPS-Rate (Bytes Per Second) falls below N for acertain time (see --min-bps-time option).
- -M N, --min-bps-time
- Used together with --min-bps. Default is 120 (seconds).
- -O, --disable-timeouts
- Disable read timeout handling code. This makes lrz hang if thesender does not send any more, but increases performance (a bit)and decreases system load (through reducing the number of systemcalls by about 50 percent).
Use this option with care.
- Open output files in synchronous write mode. This may be useful if youexperience errors due to lost interrupts if update (or bdflush orwhoever this daemon is called on your system) writes the buffers to thedisk.
This option is ignored and a warning is printed if your systems doesn't support O_SYNC.
- -p, --protect
- (ZMODEM) Protect: skip file if destination file exists.
- -q, --quiet
- Quiet suppresses verbosity.
- -r, --resume
- Crash recovery mode. lrz tries to resume interrupted file transfers.
- -R, --restricted
- Enter more restricted mode. lrz will not create directories or fileswith a leading dot if this option is given twice.
See SECURITYfor mode information about restricted mode.
- -s HH:MM, --stop-at HH:MM
- Stop transmission atHHhours,MMminutes. Another variant, using+Ninstead ofHH:MM,stops transmission inNseconds.
- -S, --timesync
- Request timesync packet from the sender. The sender sends its system time, causing lrz to complain about more then 60 seconds difference.
Lrz tries to set the local system time to the remote time if this option is given twice (this fails if lrz is not run by root).
This option makes lrz incompatible with certain other ZModems. Don'tuse it unless you know what you are doing.
- 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 toTIMtenths of seconds. This is ignored if timeout handling is turned ofthrough the O option.
- --tcp-client ADDRESS:PORT
- Act as a tcp/ip client: Connect to the given port.
See --tcp-serverfor more information.
- 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 mightwant to use this if you have to use zmodem (for which reason whatever),and cannot use the --tcpoption oflsz(perhaps because your telnet doesn't allow to spawn a local programwith stdin/stdout connected to the remote side).
If you use this option you have to start lsz with the--tcp-client ADDRESS:PORToption. lrz will print the address and port on startup.
Use of this option imposes a security risk, somebody else could connectto the port in between. SeeSECURITY for details.
- -U, --unrestrict
- turn off restricted mode (this is not possible if running undera restricted shell).
- prints out version number.
- -v, --verbose
- Verbosecauses a list of filenames to be appended to stderr.More v's generate more output.
- -wN, --windowsize N
- Set window size to N.
- -X, --xmodem
- use XMODEM protocol.
- -y, --overwrite
- Yes, clobber any existing files with the same name.
- use YMODEM protocol.
- -Z, --zmodem
- use ZMODEM protocol.
Contrary to the original ZMODEM lrz defaults to restricted mode. Inrestricted mode lrz will not accept absolute pathnames or references to a parent directory, will not modify an existing file, andremoves any files received in error. Remote command execution is disabled.
To use a more restricted mode set the environment variable ZMODEM_RESTRICTED or give theRoption. This disables creation of subdirectories and invisiblefiles.
Restricted mode may be turned off with theU option, unless lrz runs under a restricted shell.
- Use of the
- --tcp-client or --tcp-server options imposes a security risk, as somebody else could connect tothe port before you do it, and grab your data. If there's strongdemand for a more secure mode i might introduce some sort ofpassword challenge.
lrz uses the following environment variables:
- lrz recognizes a restricted shell if this variable includesrshorrksh.
- lrz enters the more restricted mode if the variable is set.
Pro-YAM Command:sz *.h *.c
(This automatically invokesrzon the connected system.)
Compile time options requiredfor various operating systems are described in thesource file.
Sending serial data to timesharing minicomputersat sustained high speedshas been known to cause lockups, system halts, kernel panics,and occasional antisocial behaviour.When experimenting with high speed input to asystem, consider rebooting the systemif the file transfers are not successful,especially if the personality of the system appears altered.
The Unix "ulimit" parameter must be set high enoughto permit large file transfers.
The TTY input buffering on some systems may not allow long blocksor streaming input at high speed.You should suspect this problem when youcan't send data to the Unix system at high speeds using ZMODEM,YMODEM-1k or XMODEM-1k,when YMODEM with 128 byte blocks works properly.If the system's tty line handling is really broken, the serial portor the entire system may not survive the onslaught of long burstsof high speed data.
The DSZ or Pro-YAMzmodem lnumeric parameter may be set to a value between 64 and 1024 to limit theburst length ("zmodem pl128").
32 bit CRC code courtesy Gary S. Brown.Directory creation code from John Gilmore's PD TAR program.
from most versions of cu
(1) doesn't work because cu's receive processfightsrz
for characters from the modem.
Programs that do not properly implement the specified file transfer protocolmay causeszto "hang" the port for a minute or two.Every reported instance of this problem has been 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.
Pathnames are restricted to 127 characters.In XMODEM single file mode, the pathname given on the command lineis still processed as described above.The ASCII option's CR/LF to NL translation merely deletes CR's;undos(omen) performs a more intelligent translation.
The VMS version does not set the file time.
VMS C Standard I/O and RMS may interact to modifyfile contents unexpectedly.
The VMS version does not support invocation asrzCOMMAND .The current VMS version does not support XMODEM, XMODEM-1k, or YMODEM.
According to the VMS documentation,the buffered input routine used on the VMS version ofrzintroduces a delayof up to one second for each protocol transaction.This delay may be significant for very short files.Removing the "#define BUFREAD" line from rz.c willeliminate this delay at the expense of increasedCPU utilization.
The VMS version causes DCL to generate a random off the wallerror message under some error conditions; this is a result ofthe incompatibility of the VMS "exit" function with theUnix/MSDOS standard.
supports incoming ZMODEM binary (-b), ASCII (-a),protect (-p),clobber (-y),and append (-+)requests.The default is protect (-p) and binary (-b).
The Unix versions support ZMODEM command execution.
rz.c, crctab.c, rbsb.c, zm.c, zmodem.h Unix source files.
rz.c, crctab.c, vrzsz.c, zm.c, zmodem.h, vmodem.h, vvmodem.c,VMS source files.
- SEE ALSO
- VMS VERSION
- ZMODEM CAPABILITIES
This document was created byman2html,using the manual pages.