mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-16 01:49:17 +08:00
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1302 bbd45198-f89e-11dd-88c7-29a3b14d5316
270 lines
6.1 KiB
Groff
270 lines
6.1 KiB
Groff
'\" Revision Level
|
|
'\" Last Delta 05-19-86
|
|
.TH RZ 1 OMEN
|
|
.SH NAME
|
|
rb, rz \- XMODEM, YMODEM, ZMODEM (Batch) file receive
|
|
.SH SYNOPSIS
|
|
.B rz
|
|
.RB [\- "\ 1bquv" ]
|
|
.br
|
|
.B rb
|
|
.RB [\- "\ 1bquv" ]
|
|
.br
|
|
.B rz
|
|
.RB [\- "\ 1bcquv" ]
|
|
.I file
|
|
.br
|
|
.RB [ \- ][ v ] rzCOMMAND
|
|
.SH DESCRIPTION
|
|
This program uses error correcting protocol to receive
|
|
files over a serial port from a variety of programs running under
|
|
PC-DOS, CP/M,
|
|
.SM Unix,
|
|
and other operating systems.
|
|
|
|
The first form of
|
|
.B rz
|
|
(Receive Batch)
|
|
receives files with ZMODEM batch protocol.
|
|
If the sending program does not support ZMODEM,
|
|
.B rz
|
|
steps down to YMODEM protocol
|
|
after 50 seconds.
|
|
This delay can be eliminated by calling the program as
|
|
.I rb .
|
|
|
|
.B Rb
|
|
accepts either standard 128 byte sectors or
|
|
1024 byte sectors
|
|
(YAM
|
|
.B -k
|
|
option).
|
|
The user should determine experimentally
|
|
the conditions under which use of 1k blocks
|
|
actually improves throughput without causing
|
|
problems.
|
|
|
|
Normally, the file contents are converted to
|
|
.SM Unix
|
|
conventions by stripping carriage returns and all characters
|
|
beginning with Control Z (CP/M end of file).
|
|
If the raw pathname ends in
|
|
".A",
|
|
".ARC",
|
|
".CCC",
|
|
".CL",
|
|
".CMD",
|
|
".COM",
|
|
".CRL",
|
|
".DAT",
|
|
".DIR",
|
|
".EXE",
|
|
".O",
|
|
".OBJ",
|
|
".OVL",
|
|
".PAG",
|
|
".REL",
|
|
".SAV",
|
|
".SUB",
|
|
".SWP",
|
|
".SYS",
|
|
".TAR",
|
|
".UTL",
|
|
".a",
|
|
".o",
|
|
".tar",
|
|
or if the first packet contains
|
|
data that suggest a binary file
|
|
(parity bits or characters in the range 000 to 006 before the first ^Z),
|
|
or if the file mode is transmitted and the 0100000
|
|
bit is set, that file will be received in binary mode anyway.
|
|
Otherwise,
|
|
if the raw pathname ends in .MSG, or .TXT, an existing file will
|
|
be appended to rather than replaced.
|
|
|
|
If extended file information (file length, etc.)
|
|
is received,
|
|
the file length controls the number of bytes written to
|
|
the output dataset (YMODEM only),
|
|
and the modify time and file mode
|
|
(iff non zero)
|
|
are set accordingly.
|
|
|
|
If no extended 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.
|
|
Normally, each file name is converted to lower case
|
|
unless it contains one or more lower case letters.
|
|
|
|
|
|
The second form of
|
|
.B rz
|
|
receives a single
|
|
.I file
|
|
with XMODEM protocol.
|
|
The user must supply the file name to both sending and receiving programs.
|
|
|
|
|
|
The third form of
|
|
.B rz
|
|
is invoked as
|
|
.B rzCOMMAND
|
|
(with an optional leading \- as generated by login(1)).
|
|
For each received file,
|
|
rz will pipe the file to ``COMMAND filename''
|
|
where filename is the name of the transmitted file
|
|
with 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 is
|
|
.I rzrmail
|
|
which 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 to
|
|
.I rzrmail
|
|
on a
|
|
.SM Unix
|
|
system
|
|
would result in the contents of the DOS file "caf" being mailed to user "caf".
|
|
|
|
On some
|
|
.SM Unix
|
|
systems, the login directory must contain a link to
|
|
COMMAND as login sets SHELL=rsh which disallows absolute
|
|
pathnames.
|
|
If invoked with a leading ``v'',
|
|
.B rz
|
|
will report progress to LOGFILE.
|
|
The following entry works for
|
|
.SM Unix
|
|
3.0:
|
|
.ce
|
|
rzrmail::5:1::/bin:/usr/local/rzrmail
|
|
If the SHELL environment variable includes
|
|
.I "rsh"
|
|
or
|
|
.I "rksh"
|
|
(restricted shell),
|
|
rz will not accept absolute pathnames
|
|
or references to a parent directory,
|
|
will not modify an existing file, and
|
|
removes any files received in error.
|
|
|
|
If
|
|
.B rz
|
|
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
|
|
.B q
|
|
option.
|
|
|
|
.PP
|
|
The meanings of the available options are:
|
|
.PP
|
|
.PD 0
|
|
.TP
|
|
.B 1
|
|
Use file descriptor 1 for ioctls and reads (Unix only).
|
|
By default, file descriptor 0 is used.
|
|
This option allows
|
|
.B rz
|
|
to be used with the
|
|
.I cu
|
|
~$
|
|
command.
|
|
.TP
|
|
.B b
|
|
Transfer all files in binary
|
|
(tell it like it is)
|
|
mode.
|
|
This option disables file append.
|
|
.TP
|
|
.B c
|
|
Request 16 bit CRC
|
|
(XMODEM file transfers default to 8 bit checksum).
|
|
Batch transfers use 16 bit CRC.
|
|
.TP
|
|
.B D
|
|
Output file data to /dev/null; for testing.
|
|
.TP
|
|
.B q
|
|
Quiet suppresses verbosity.
|
|
.TP
|
|
.B v
|
|
Verbose
|
|
causes a list of file
|
|
names to be appended to
|
|
/tmp/rzlog .
|
|
More v's generate more output.
|
|
.TP
|
|
.B u
|
|
Retain upper case letters in file names.
|
|
.PD
|
|
.SH EXAMPLES
|
|
.ne 6
|
|
.RE
|
|
(Pro-YAM command)
|
|
.RS
|
|
.I <ALT-2>
|
|
.br
|
|
YAM Command:
|
|
.I "sz *.h *.c"
|
|
.br
|
|
(This automatically invokes
|
|
.I rz
|
|
on the connected system.)
|
|
.RE
|
|
.SH SEE ALSO
|
|
ZMODEM.DOC,
|
|
YMODEM.DOC,
|
|
IMP(CP/M),
|
|
cu(1),
|
|
Professional-YAM manual,
|
|
sz(omen),
|
|
usq(omen),
|
|
undos(omen)
|
|
|
|
Compile time options required
|
|
for various operating systems are described in the
|
|
source file.
|
|
.SH BUGS
|
|
Pathnames are restricted to 127 characters.
|
|
In XMODEM single file mode, the pathname given on the command line
|
|
is still processed as described above.
|
|
The CR/LF to NL translation merely deletes CR\'s;
|
|
undos(omen) performs a more intelligent translation.
|
|
.SH "VMS VERSION"
|
|
Some of the #includes with file names enclosed with angle brackets <>
|
|
may need to have the angle brackets changed to "", or vice versa.
|
|
|
|
The VMS version does not set binary mode according to the incoming
|
|
file type.
|
|
Non binary file processing consists of stripping all characters beginning
|
|
with CPMEOF (^Z).
|
|
|
|
The VMS version does not set the file time.
|
|
|
|
At high speeds,
|
|
VMS sometimes loses incoming characters, resulting in retries
|
|
and degradation of throughput.
|
|
|
|
The mysterious
|
|
VMS C Standard I/O Package and RMS may interact to modify
|
|
file contents unexpectedly.
|
|
|
|
The VMS version does not support invocation as
|
|
.B rzCOMMAND .
|
|
ZMODEM has not yet been implemented on the VMS version.
|
|
.SH "ZMODEM CAPABILITIES"
|
|
.B Rz
|
|
supports incoming ZMODEM binary (-b), ASCII (-a), and append (-+)
|
|
requests, and ZMODEM command execution.
|
|
.SH FILES
|
|
rz.c, rbsb.c, zm.c, zmodem.h source files.
|
|
|
|
/tmp/rzlog stores debugging output generated with -vv option.
|