RZ.1 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. '\" Revision Level
  2. '\" Last Delta 05-19-86
  3. .TH RZ 1 OMEN
  4. .SH NAME
  5. rb, rz \- XMODEM, YMODEM, ZMODEM (Batch) file receive
  6. .SH SYNOPSIS
  7. .B rz
  8. .RB [\- "\ 1bquv" ]
  9. .br
  10. .B rb
  11. .RB [\- "\ 1bquv" ]
  12. .br
  13. .B rz
  14. .RB [\- "\ 1bcquv" ]
  15. .I file
  16. .br
  17. .RB [ \- ][ v ] rzCOMMAND
  18. .SH DESCRIPTION
  19. This program uses error correcting protocol to receive
  20. files over a serial port from a variety of programs running under
  21. PC-DOS, CP/M,
  22. .SM Unix,
  23. and other operating systems.
  24. The first form of
  25. .B rz
  26. (Receive Batch)
  27. receives files with ZMODEM batch protocol.
  28. If the sending program does not support ZMODEM,
  29. .B rz
  30. steps down to YMODEM protocol
  31. after 50 seconds.
  32. This delay can be eliminated by calling the program as
  33. .I rb .
  34. .B Rb
  35. accepts either standard 128 byte sectors or
  36. 1024 byte sectors
  37. (YAM
  38. .B -k
  39. option).
  40. The user should determine experimentally
  41. the conditions under which use of 1k blocks
  42. actually improves throughput without causing
  43. problems.
  44. Normally, the file contents are converted to
  45. .SM Unix
  46. conventions by stripping carriage returns and all characters
  47. beginning with Control Z (CP/M end of file).
  48. If the raw pathname ends in
  49. ".A",
  50. ".ARC",
  51. ".CCC",
  52. ".CL",
  53. ".CMD",
  54. ".COM",
  55. ".CRL",
  56. ".DAT",
  57. ".DIR",
  58. ".EXE",
  59. ".O",
  60. ".OBJ",
  61. ".OVL",
  62. ".PAG",
  63. ".REL",
  64. ".SAV",
  65. ".SUB",
  66. ".SWP",
  67. ".SYS",
  68. ".TAR",
  69. ".UTL",
  70. ".a",
  71. ".o",
  72. ".tar",
  73. or if the first packet contains
  74. data that suggest a binary file
  75. (parity bits or characters in the range 000 to 006 before the first ^Z),
  76. or if the file mode is transmitted and the 0100000
  77. bit is set, that file will be received in binary mode anyway.
  78. Otherwise,
  79. if the raw pathname ends in .MSG, or .TXT, an existing file will
  80. be appended to rather than replaced.
  81. If extended file information (file length, etc.)
  82. is received,
  83. the file length controls the number of bytes written to
  84. the output dataset (YMODEM only),
  85. and the modify time and file mode
  86. (iff non zero)
  87. are set accordingly.
  88. If no extended file information is received,
  89. slashes in the pathname are changed to underscore,
  90. and any trailing period in the pathname is eliminated.
  91. This conversion is useful for files received from CP/M systems.
  92. Normally, each file name is converted to lower case
  93. unless it contains one or more lower case letters.
  94. The second form of
  95. .B rz
  96. receives a single
  97. .I file
  98. with XMODEM protocol.
  99. The user must supply the file name to both sending and receiving programs.
  100. The third form of
  101. .B rz
  102. is invoked as
  103. .B rzCOMMAND
  104. (with an optional leading \- as generated by login(1)).
  105. For each received file,
  106. rz will pipe the file to ``COMMAND filename''
  107. where filename is the name of the transmitted file
  108. with the file contents as standard input.
  109. Each file transfer is acknowledged when COMMAND exits with 0 status.
  110. A non zero exit status terminates transfers.
  111. A typical use for this form is
  112. .I rzrmail
  113. which calls rmail(1)
  114. to post mail to the user specified by the transmitted file name.
  115. For example, sending the file "caf" from a PC-DOS system to
  116. .I rzrmail
  117. on a
  118. .SM Unix
  119. system
  120. would result in the contents of the DOS file "caf" being mailed to user "caf".
  121. On some
  122. .SM Unix
  123. systems, the login directory must contain a link to
  124. COMMAND as login sets SHELL=rsh which disallows absolute
  125. pathnames.
  126. If invoked with a leading ``v'',
  127. .B rz
  128. will report progress to LOGFILE.
  129. The following entry works for
  130. .SM Unix
  131. 3.0:
  132. .ce
  133. rzrmail::5:1::/bin:/usr/local/rzrmail
  134. If the SHELL environment variable includes
  135. .I "rsh"
  136. or
  137. .I "rksh"
  138. (restricted shell),
  139. rz will not accept absolute pathnames
  140. or references to a parent directory,
  141. will not modify an existing file, and
  142. removes any files received in error.
  143. If
  144. .B rz
  145. is invoked with stdout and stderr to different datasets,
  146. Verbose is set to 2, causing frame by frame progress reports
  147. to stderr.
  148. This may be disabled with the
  149. .B q
  150. option.
  151. .PP
  152. The meanings of the available options are:
  153. .PP
  154. .PD 0
  155. .TP
  156. .B 1
  157. Use file descriptor 1 for ioctls and reads (Unix only).
  158. By default, file descriptor 0 is used.
  159. This option allows
  160. .B rz
  161. to be used with the
  162. .I cu
  163. ~$
  164. command.
  165. .TP
  166. .B b
  167. Transfer all files in binary
  168. (tell it like it is)
  169. mode.
  170. This option disables file append.
  171. .TP
  172. .B c
  173. Request 16 bit CRC
  174. (XMODEM file transfers default to 8 bit checksum).
  175. Batch transfers use 16 bit CRC.
  176. .TP
  177. .B D
  178. Output file data to /dev/null; for testing.
  179. .TP
  180. .B q
  181. Quiet suppresses verbosity.
  182. .TP
  183. .B v
  184. Verbose
  185. causes a list of file
  186. names to be appended to
  187. /tmp/rzlog .
  188. More v's generate more output.
  189. .TP
  190. .B u
  191. Retain upper case letters in file names.
  192. .PD
  193. .SH EXAMPLES
  194. .ne 6
  195. .RE
  196. (Pro-YAM command)
  197. .RS
  198. .I <ALT-2>
  199. .br
  200. YAM Command:
  201. .I "sz *.h *.c"
  202. .br
  203. (This automatically invokes
  204. .I rz
  205. on the connected system.)
  206. .RE
  207. .SH SEE ALSO
  208. ZMODEM.DOC,
  209. YMODEM.DOC,
  210. IMP(CP/M),
  211. cu(1),
  212. Professional-YAM manual,
  213. sz(omen),
  214. usq(omen),
  215. undos(omen)
  216. Compile time options required
  217. for various operating systems are described in the
  218. source file.
  219. .SH BUGS
  220. Pathnames are restricted to 127 characters.
  221. In XMODEM single file mode, the pathname given on the command line
  222. is still processed as described above.
  223. The CR/LF to NL translation merely deletes CR\'s;
  224. undos(omen) performs a more intelligent translation.
  225. .SH "VMS VERSION"
  226. Some of the #includes with file names enclosed with angle brackets <>
  227. may need to have the angle brackets changed to "", or vice versa.
  228. The VMS version does not set binary mode according to the incoming
  229. file type.
  230. Non binary file processing consists of stripping all characters beginning
  231. with CPMEOF (^Z).
  232. The VMS version does not set the file time.
  233. At high speeds,
  234. VMS sometimes loses incoming characters, resulting in retries
  235. and degradation of throughput.
  236. The mysterious
  237. VMS C Standard I/O Package and RMS may interact to modify
  238. file contents unexpectedly.
  239. The VMS version does not support invocation as
  240. .B rzCOMMAND .
  241. ZMODEM has not yet been implemented on the VMS version.
  242. .SH "ZMODEM CAPABILITIES"
  243. .B Rz
  244. supports incoming ZMODEM binary (-b), ASCII (-a), and append (-+)
  245. requests, and ZMODEM command execution.
  246. .SH FILES
  247. rz.c, rbsb.c, zm.c, zmodem.h source files.
  248. /tmp/rzlog stores debugging output generated with -vv option.