.TH rz "" "" "Command"
.PC "Z-modem batch-file receptor"
\fBrz [\-  +abepqtuvy ]\fR
\fBrz\fIcommand\fR
.PP
.B rz
(``receive Z-modem'')
receives files that have been transmitted via the Z-modem protocol.
It is designed to be used with the command
.BR sz ,
which sends files using this protocol.
Path names are supplied by the sending program,
and directories are made if necessary (and possible).
.SH "Command-line Options"
.B rz
recognizes the following command-line options:
.IP \fBa\fR 0.3i
ASCII mode:
Convert files to \*(UN
conventions by stripping carriage returns, and throw away all characters
that follow the first
.B <ctrl-Z>
(CP/M end of file).
.IP \fBb\fR
Binary mode:
Send the file just as it is, without any conversion whatsoever.
.IP \fBc\fR
Request 16-bit CRC.
This is the default.
.IP \fBD\fR
Redirect file data to
.BR /dev/null .
Use this option to test a connect but without actually copying a file onto
your system.
.IP \fBe\fR
Force sender to escape all control characters;
normally XON, XOFF, DLE, CR-@-CR, and
.B <ctrl-X>
are escaped.
.IP \fBp\fR
Protect mode:
If the file being downloaded already exists on your system,
do not overwrite it.
.IP \fBq\fR
Quiet mode.
.IP "\fBt \fItime\fR"
Change timeout to
.I time
tenths of a second.
.IP \fBv\fR
Verbose mode:
append a list of files being downloaded onto file
.BR /tmp/rzlog .
Option
.B vv
outputs more information;
.B vvv
more yet.
.IP \fBy\fR
Yes mode:
If the file being downloaded already exists on your system,
overwrite it.
.SH "Command Mode"
You can also invoke
.B rz
in ``command mode,''
using the syntax
.BI rz command.
For each received file,
.B rz
pipes the file to
.I "command filename"
where
.I filename
is the name of the transmitted file, with the file's contents as standard input.
.PP
Each file transfer is acknowledged when
.I command
exits with a status of zero.
An exit status other than zero terminates transfers.
.PP
A typical for this mode is the command
.BR rzrmail ,
which calls
.B rmail
to post mail to the user specified by the transmitted file name.
For example, sending the file
.B caf
from a remote \*(CO system to
.B rzrmail
on your system
would result in the contents of
.B caf
being mailed to user
.BR caf .
.PP
For
.B rz
to work in command mode, you must link the command in question to
.BR /usr/bin/rz .
For example, to use the command
.BR rzrmail ,
you must link
.B rz
to
.B rzrmail
as follows:
.DM
	ln -f /usr/bin/rz /usr/bin/rzrmail
.DE
.SH "rz and cu"
To use
.B rz
and
.B sz
under the command
.BR cu ,
do the following:
.IP \(bu 0.3i
Use
.B cu
to log into the remote system, as usual.
.IP \(bu
Invoke
.B sz
on the remote system to send a file.
For example, to send file
.BR foo ,
use the command
.DM
	sz foo
.DE
.IP \(bu
Use the
.B cu
command `+' to invoke
.R rz
your system, as follows:
.DM
	~+rz
.DE
.IP \(bu
When transmission has completed, press \*(RT
to resume working on the remote system.
.SH "See Also"
.B
commands,
cu,
rb,
rx,
sz
.R
.SH Notes
.B rz
was written by
Chuck A. Forsberg (...!tektronix!reed!omen!caf).
The 32-bit CRC code was written by courtesy Gary S. Brown.
Directory creation code from John Gilmore's PD TAR program.

