1RZ(1)                       General Commands Manual                      RZ(1)
2
3
4

NAME

6       rx, rb, rz - XMODEM, YMODEM, ZMODEM (Batch) file receive
7

SYNOPSIS

9       rz [- +8abeOpqRtTuUvy]
10       rb [- +abqRtuUvy]
11       rx [- abceqRtuUv] file
12       [-][v]rzCOMMAND
13

DESCRIPTION

15       This  program  uses  error correcting protocols to receive files over a
16       dial-in serial port from a variety of programs  running  under  PC-DOS,
17       CP/M,  Unix,  and  other operating systems.  It is invoked from a shell
18       prompt manually, or automatically as a result of an "sz file ..."  com‐
19       mand given to the calling program.
20
21       While  rz is smart enough to be called from cu(1), very few versions of
22       cu(1) are smart enough to allow rz to work properly.  Unix  flavors  of
23       Professional-YAM are available for such dial-out application.
24
25
26       Rz  (Receive  ZMODEM)  receives  files  with the ZMODEM batch protocol.
27       Pathnames are supplied by the sending program, and directories are made
28       if  necessary  (and possible).  Normally, the "rz" command is automati‐
29       cally issued by the calling ZMODEM program, but some  defective  ZMODEM
30       implementations may require starting rz the old fashioned way.
31
32
33       Rb  receives  file(s)  with  YMODEM, accepting either standard 128 byte
34       sectors or 1024 byte sectors (YAM  sb  -k  option).   The  user  should
35       determine  when the 1024 byte block length actually improves throughput
36       without causing lost data or even system crashes.
37
38       If True YMODEM  (Omen  Technology  trademark)  file  information  (file
39       length,  etc.)   is  received,  the  file length controls the number of
40       bytes written to the output dataset, and the modify time and file  mode
41       (iff non zero) are set accordingly.
42
43       If no True YMODEM file information is received, slashes in the pathname
44       are changed to underscore, and any trailing period in the  pathname  is
45       eliminated.   This  conversion  is  useful for files received from CP/M
46       systems.  With YMODEM, each file name is converted to lower case unless
47       it contains one or more lower case letters.
48
49
50       Rx  receives a single file with XMODEM or XMODEM-1k protocol.  The user
51       should determine when the 1024  byte  block  length  actually  improves
52       throughput  without  causing  problems.   The user must supply the file
53       name to both sending and receiving programs.  Up to 1023 garbage  char‐
54       acters may be added to the received file.
55
56
57       Rz may be invoked as rzCOMMAND (with an optional leading - as generated
58       by login(1)).  For each received file, rz will pipe the file to  ``COM‐
59       MAND filename'' where filename is the name of the transmitted file with
60       the file contents as standard input.
61
62       Each file transfer is acknowledged when COMMAND exits with 0 status.  A
63       non zero exit status terminates transfers.
64
65       A  typical  use  for  this form is rzrmail which calls rmail(1) to post
66       mail to the user specified by the transmitted file name.  For  example,
67       sending the file "caf" from a PC-DOS system to rzrmail on a Unix system
68       would result in the contents of the DOS file "caf" being mailed to user
69       "caf".
70
71       On  some  Unix systems, the login directory must contain a link to COM‐
72       MAND as login sets SHELL=rsh which disallows  absolute  pathnames.   If
73       invoked  with  a leading ``v'', rz will be verbose (see v option).  The
74       following entry works for Unix SYS III/V:
75                        rzrmail::5:1::/bin:/usr/local/rzrmail
76       If the  SHELL  environment  variable  includes  rsh  ,  rbash  or  rksh
77       (restricted shell), rz will not accept absolute pathnames or references
78       to a parent directory, will not modify an existing  file,  and  removes
79       any files received in error.
80
81       If  rz is invoked with stdout and stderr to different datasets, Verbose
82       is set to 2, causing frame by frame progress reports to  stderr.   This
83       may be disabled with the q option.
84
85

OPTIONS

87       The meanings of the available options are:
88
89       -+, --append
90              append received data to an existing file (ZMODEM, ASCII only).
91       -a, --ascii
92              Convert  files to Unix conventions by stripping carriage returns
93              and all characters beginning with the first Control Z (CP/M  end
94              of file).
95       -b, --binary
96              Binary (tell it like it is) file transfer override.
97       -B NUMBER, --bufsize NUMBER
98              Buffer  NUMBER  bytes before writing to disk. Default ist 32768,
99              which should be enough for most situations. If you have  a  slow
100              machine  or  a  bad disk interface or suffer from other hardware
101              problems you might want to increase the buffersize.  -1 or  auto
102              use  a  buffer large enough to buffer the whole file. Be careful
103              with this options - things normally get worse,  not  better,  if
104              the machine starts to swap.
105       -c, --with-crc
106              XMODEM  only.  Use  16  bit CRC (normally a one byte checksum is
107              used).
108       -C, --allow-remote-commands
109              allow remote command execution ( insecure  ).  This  allows  the
110              sender  to  execute  an  arbitrary  command through system () or
111              execl (). Default is to disable this feature (?). This option is
112              ignored if running in restricted mode.
113       -D, --null
114              Output file data to /dev/null; for testing.  (Unix only)
115       --delay-startup N
116              Wait N seconds before doing anything.
117       -e, --escape
118              Force  sender  to  escape  all control characters; normally XON,
119              XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
120       -E, --rename
121              Rename incoming file if target filename already exists. The  new
122              file name will have a dot and a number (0..999) appended.
123       -h, --help
124              give help screen.
125       -m N, --min-bps N
126              Stop  transmission  if BPS-Rate (Bytes Per Second) falls below N
127              for a certain time (see --min-bps-time option).
128       -M N, --min-bps-time
129              Used together with --min-bps. Default is 120 (seconds).
130       -O, --disable-timeouts
131              Disable read timeout handling code. This makes lrz hang  if  the
132              sender does not send any more, but increases performance (a bit)
133              and decreases system load (through reducing the number of system
134              calls by about 50 percent).
135
136              Use this option with care.
137       --o-sync
138              Open  output files in synchronous write mode. This may be useful
139              if you experience errors due to lost interrupts  if  update  (or
140              bdflush  or whoever this daemon is called on your system) writes
141              the buffers to the disk.
142
143              This option is ignored and a warning is printed if your  systems
144              doesn't support O_SYNC.
145       -p, --protect
146              (ZMODEM) Protect: skip file if destination file exists.
147       -q, --quiet
148              Quiet suppresses verbosity.
149       -r, --resume
150              Crash recovery mode. lrz tries to resume interrupted file trans‐
151              fers.
152       -R, --restricted
153              Enter more restricted mode. lrz will not create  directories  or
154              files with a leading dot if this option is given twice.
155
156              See SECURITY for mode information about restricted mode.
157       -s HH:MM, --stop-at HH:MM
158              Stop  transmission  at  HH  hours,  MM minutes. Another variant,
159              using +N instead of HH:MM, stops transmission in N seconds.
160       -S, --timesync
161              Request timesync packet from the sender. The  sender  sends  its
162              system  time, causing lrz to complain about more then 60 seconds
163              difference.
164
165              Lrz tries to set the local system time to  the  remote  time  if
166              this  option  is  given  twice  (this fails if lrz is not run by
167              root).
168
169              This option makes lrz incompatible with certain  other  ZModems.
170              Don't use it unless you know what you are doing.
171       --syslog[=off]
172              turn syslogging on or off. the default is set at configure time.
173              This option is ignored if no syslog support is compiled in.
174       -t TIM, --timeout TIM
175              Change timeout to TIM tenths of  seconds.  This  is  ignored  if
176              timeout handling is turned of through the O option.
177       --tcp-client ADDRESS:PORT
178              Act as a tcp/ip client: Connect to the given port.
179
180              See --tcp-server for more information.
181
182       --tcp-server
183              Act  as  a server: Open a socket, print out what to do, wait for
184              connection.
185
186              You will normally not want to use this option as  lrzsz  is  the
187              only  zmodem  which  understands what to do (private extension).
188              You might want to use this if you have to use zmodem (for  which
189              reason  whatever),  and cannot use the --tcp option of lsz (per‐
190              haps because your telnet doesn't allow to spawn a local  program
191              with stdin/stdout connected to the remote side).
192
193              If  you  use  this  option you have to start lsz with the --tcp-
194              client ADDRESS:PORT option.  lrz will print the address and port
195              on startup.
196
197              Use  of this option imposes a security risk, somebody else could
198              connect to the port in between. See SECURITY for details.
199       -U, --unrestrict
200              turn off restricted mode (this is not possible if running  under
201              a restricted shell).
202       --version
203              prints out version number.
204       -v, --verbose
205              Verbose  causes  a  list of file names to be appended to stderr.
206              More v's generate more output.
207       -wN, --windowsize N
208              Set window size to N.
209       -X, --xmodem
210              use XMODEM protocol.
211       -y, --overwrite
212              Yes, clobber any existing files with the same name.
213       --ymodem
214              use YMODEM protocol.
215       -Z, --zmodem
216              use ZMODEM protocol.
217

SECURITY

219       Contrary to the original ZMODEM lrz defaults  to  restricted  mode.  In
220       restricted mode lrz will not accept absolute pathnames or references to
221       a parent directory, will not modify an existing file, and  removes  any
222       files received in error. Remote command execution is disabled.
223
224       To  use  a  more  restricted  mode  set  the  environment variable ZMO‐
225       DEM_RESTRICTED or give the R option. This disables creation  of  subdi‐
226       rectories and invisible files.
227
228       Restricted  mode  may  be turned off with the U option, unless lrz runs
229       under a restricted shell.
230
231
232       Use of the
233              --tcp-client or --tcp-server options imposes a security risk, as
234              somebody  else  could  connect to the port before you do it, and
235              grab your data. If there's strong demand for a more secure  mode
236              i might introduce some sort of password challenge.
237
238

ENVIRONMENT

240       lrz uses the following environment variables:
241
242       SHELL  lrz  recognizes a restricted shell if this variable includes rsh
243              or rksh
244
245       ZMODEM_RESTRICTED
246              lrz enters the more restricted mode if the variable is set.
247

EXAMPLES

249(Pro-YAM command)

<ALT-2>

251Pro-YAM Command: sz *.h *.c
252(This automatically invokes rz on the connected system.)
253

SEE ALSO

255       ZMODEM.DOC,   YMODEM.DOC,   Professional-YAM,   crc(omen),    sz(omen),
256       usq(omen), undos(omen)
257
258       Compile  time  options  required  for  various  operating  systems  are
259       described in the source file.
260

NOTES

262       Sending serial data to  timesharing  minicomputers  at  sustained  high
263       speeds  has  been  known to cause lockups, system halts, kernel panics,
264       and occasional antisocial  behaviour.   When  experimenting  with  high
265       speed  input  to  a  system,  consider rebooting the system if the file
266       transfers are not successful, especially if the personality of the sys‐
267       tem appears altered.
268
269       The  Unix  "ulimit"  parameter  must be set high enough to permit large
270       file transfers.
271
272       The TTY input buffering on some systems may not allow  long  blocks  or
273       streaming  input  at  high speed.  You should suspect this problem when
274       you can't send data to the Unix system at  high  speeds  using  ZMODEM,
275       YMODEM-1k  or  XMODEM-1k,  when YMODEM with 128 byte blocks works prop‐
276       erly.  If the system's tty line handling is really broken,  the  serial
277       port  or the entire system may not survive the onslaught of long bursts
278       of high speed data.
279
280       The DSZ or Pro-YAM zmodem l numeric parameter may be  set  to  a  value
281       between 64 and 1024 to limit the burst length ("zmodem pl128").
282
283       32  bit  CRC code courtesy Gary S. Brown.  Directory creation code from
284       John Gilmore's PD TAR program.
285

BUGS

287       Calling rz from most  versions  of  cu(1)  doesn't  work  because  cu's
288       receive process fights rz for characters from the modem.
289
290       Programs  that  do  not  properly implement the specified file transfer
291       protocol may cause sz to "hang" the port for a minute  or  two.   Every
292       reported  instance  of  this problem has been corrected by using ZCOMM,
293       Pro-YAM, or other program with a correct implementation of  the  speci‐
294       fied protocol.
295
296       Many  programs  claiming  to support YMODEM only support XMODEM with 1k
297       blocks, and they often don't get that quite right.
298
299       Pathnames are restricted to 127  characters.   In  XMODEM  single  file
300       mode,  the  pathname  given  on  the command line is still processed as
301       described above.  The ASCII option´s CR/LF  to  NL  translation  merely
302       deletes CR´s; undos(omen) performs a more intelligent translation.
303

VMS VERSION

305       The VMS version does not set the file time.
306
307       VMS  C  Standard I/O and RMS may interact to modify file contents unex‐
308       pectedly.
309
310       The VMS version does not support invocation as rzCOMMAND .  The current
311       VMS version does not support XMODEM, XMODEM-1k, or YMODEM.
312
313       According  to the VMS documentation, the buffered input routine used on
314       the VMS version of rz introduces a delay of up to one second  for  each
315       protocol  transaction.   This  delay  may be significant for very short
316       files.  Removing the "#define BUFREAD" line from  rz.c  will  eliminate
317       this delay at the expense of increased CPU utilization.
318
319       The VMS version causes DCL to generate a random off the wall error mes‐
320       sage under some error conditions; this is a result of the incompatibil‐
321       ity of the VMS "exit" function with the Unix/MSDOS standard.
322

ZMODEM CAPABILITIES

324       Rz  supports  incoming  ZMODEM  binary  (-b), ASCII (-a), protect (-p),
325       clobber (-y), and append (-+) requests.  The default  is  protect  (-p)
326       and binary (-b).
327
328       The Unix versions support ZMODEM command execution.
329

FILES

331       rz.c, crctab.c, rbsb.c, zm.c, zmodem.h Unix source files.
332
333       rz.c,  crctab.c,  vrzsz.c,  zm.c,  zmodem.h,  vmodem.h,  vvmodem.c, VMS
334       source files.
335
336
337
338                                     OMEN                                RZ(1)
Impressum