home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / TERMS / ZMODEM.ZIP / SZ.1 < prev    next >
Text File  |  1987-09-28  |  9KB  |  351 lines

  1. '\" Revision Level 
  2. '\" Last Delta     6-01-86
  3. .TH SZ 1 OMEN
  4. .SH NAME
  5. sz \- XMODEM, YMODEM, ZMODEM Batch file Send
  6. .SH SYNOPSIS
  7. sz
  8. .RB [\- +1adfkLlnqTuvy ]
  9. .I file ...
  10. .br
  11. sz -X
  12. .RB [\- 1kquv ]
  13. .I file
  14. .br
  15. sz
  16. .RB [\- 1qv ]
  17. .B "-c COMMAND"
  18. .br
  19. sz
  20. .RB [\- 1qv ]
  21. .B "-i COMMAND"
  22. .SH DESCRIPTION
  23. .B Sz
  24. uses the ZMODEM, YMODEM or XMODEM error correcting protocol to send
  25. one or more files over a serial port to a variety of programs running under
  26. PC-DOS, CP/M, Unix, VMS, and other operating systems.
  27.  
  28.  
  29. The first form of
  30. .B sz
  31. sends one or more files with ZMODEM or YMODEM batch protocol.
  32. Normally, only the file name part of the pathname is transmitted.
  33. On
  34. .SM Unix
  35. systems, additional information about the file is transmitted.
  36. If the receiving program uses this information,
  37. the transmitted file length controls the exact number of bytes written to
  38. the output dataset,
  39. and the modify time and file mode
  40. are set accordingly.
  41.  
  42. Output from another program may be piped to
  43. .B sz
  44. for transmission by specifying the
  45. .B -1
  46. option and denoting standard input by "-":
  47. .ce
  48. ps -ef | sz -
  49. The program output is transmitted with the filename sPID.sz
  50. where PID is the process ID of the
  51. .B sz
  52. program.
  53. If the environment variable
  54. .B ONAME
  55. is set, that is used instead.
  56. In this case, the Unix command:
  57. .ce
  58. ONAME=con ps -ef|sz -ay -
  59. will send a "file" to the PC-DOS console display.
  60. The
  61. .B -y
  62. bypasses the receiver\'s checking of the output filename.
  63. The
  64. .B -a
  65. causes the receiver to convert Unix newlines to PC-DOS carriage returns
  66. and linefeeds.
  67.  
  68. Unix
  69. .B sz
  70. supports
  71. .B YMODEM-g
  72. with "cbreak" tty mode, XON/XOFF flow control,
  73. and the interrupt character set to CAN.
  74. .B YMODEM-g
  75. (Professional-YAM
  76. .B g
  77. option)
  78. increases throughput over error free channels
  79. (direct connection, X.PC, etc.)
  80. by not acknowledging each transmitted sector.
  81.  
  82.  
  83. The second form of
  84. .B sz
  85. uses the
  86. .B -X
  87. flag to send a single
  88. .I file
  89. with
  90. .B XMODEM
  91. protocol.
  92. The user must supply the file name to both sending and receiving programs.
  93.  
  94. Iff
  95. .B sz
  96. is invoked with $SHELL set and iff that variable contains the
  97. string
  98. .I "rsh"
  99. or
  100. .I "rksh"
  101. (restricted shell), sz operates in restricted mode.
  102. Restricted mode restricts pathnames to the current directory and
  103. PUBDIR (usually /usr/spool/uucppublic) and/or subdirectories
  104. thereof.
  105.  
  106.  
  107. The third form sends a single COMMAND to the receiver for execution.
  108. .B Sz
  109. exits with the COMMAND return value.
  110. If COMMAND includes spaces or characters special to the shell,
  111. it must be quoted.
  112.  
  113. The fourth form sends a single COMMAND to the receiver for execution.
  114. .B Sz
  115. exits as soon as the receiver has received the command, before it is executed.
  116.  
  117.  
  118. If sz is invoked with stdout and stderr to different datasets,
  119. Verbose is set to 2, causing frame by frame progress reports
  120. to stderr.
  121. This may be disabled with the
  122. .B q
  123. option.
  124. .PP
  125. The meanings of the available options are:
  126. .PP
  127. .PD 0
  128. .TP
  129. .B +
  130. Force the receiver to append transmitted data to an existing file
  131. (ZMODEM only).
  132. .TP
  133. .B 1
  134. Use file descriptor 1 for ioctls and reads (Unix only).
  135. By default, file descriptor 0 is used.
  136. This option allows
  137. .B sz
  138. to be used with the
  139. .I cu
  140. ~$
  141. command.
  142. .TP
  143. .B a
  144. Convert NL characters in the transmitted file to CR/LF.
  145. This is done by the sender for XMODEM and YMODEM, by the receiver
  146. for ZMODEM.
  147. .TP
  148. .B "c COMMAND"
  149. Send COMMAND to the receiver for execution, return with COMMAND\'s exit status.
  150. .TP
  151. .B "C N"
  152. Make N attempts at ten second intervals
  153. to read COMMAND\'s exit status before exiting.
  154. .TP
  155. .B d
  156. Change all instances of "." to "/" in the transmitted pathname.
  157. Thus, C.omenB0000 (which is unacceptable to MSDOS or CP/M)
  158. is transmitted as C/omenB0000.
  159. If the resultant filename has more than 8 characters in the stem,
  160. a "." in inserted to allow a total of eleven.
  161. .TP
  162. .B f
  163. Send Full pathname.
  164. Normally directory prefixes are stripped from the transmitted
  165. filename.
  166. .TP
  167. .B "i COMMAND"
  168. Send COMMAND to the receiver for execution, return Immediately.
  169. .TP
  170. .B k
  171. Send files using YMODEM 1024 byte blocks
  172. rather than the default 128 byte blocks.
  173. 1024 byte packets speed file transfers at high bit rates.
  174. (ZMODEM streams the data for the best possible throughput.)
  175. .TP
  176. .B "L N"
  177. Use ZMODEM sub-packets of length N.
  178. A larger N (N <= 64 <= 1024) gives slightly higher throughput,
  179. a smaller N speeds error recovery.
  180. The default is 128 below 300 baud, 256 above 300 baud, or 1024 above 2400 baud.
  181. .TP
  182. .B "l N"
  183. Wait for the receiver to acknowledge correct data every
  184. .B N
  185. characters.
  186. This may be used to avoid network overrun when XOFF flow control is lacking.
  187. .TP
  188. .B n
  189. Instruct ZMODEM receiver to skip files if the length and modification times
  190. of the source file and the file on the destination system are equal.
  191. .TP
  192. .B N
  193. Instruct ZMODEM receiver to skip files if the length and CRC\'s
  194. of the source file and the file on the destination system are equal.
  195. .TP
  196. .B q
  197. Quiet suppresses verbosity.
  198. .TP
  199. .B r
  200. Resume interrupted file transfer.
  201. If the source file is longer than the destination file,
  202. the transfer commences at the offset in the source file that equals
  203. the length of the destination file.
  204. .TP
  205. .B u
  206. Unlink the file after successful transmission.
  207. .TP
  208. .B v
  209. Verbose
  210. causes a list of file
  211. names to be appended to
  212. /tmp/szlog .
  213. More v's generate more output.
  214. .TP
  215. .B X
  216. Send a single file with
  217. .B XMODEM
  218. protocol.
  219. .TP
  220. .B y
  221. Force a ZMODEM receiving program to overwrite any existing file
  222. with the same name.
  223. .PD
  224. .SH EXAMPLES
  225. .ne 7
  226. .B "ZMODEM File Transfer"
  227. .br
  228. .B "$ sz -a *.c"
  229. .br
  230. This single command transfers all .c files in the current Unix directory
  231. with conversion
  232. .RB ( -a )
  233. to PC-DOS end of line conventions.
  234. With ZMODEM AutoDownload enabled, Professional-YAM automatically recieves
  235. the files after performing a security challenge.
  236.  
  237. .B "ZMODEM Command Download"
  238. .br
  239.  cpszall:all
  240.     sz -c "c:;cd /yam/dist"
  241.     sz -ya $(YD)/*.me
  242.     sz -yqb y*.exe
  243.     sz -c "cd /yam"
  244.     sz -i "!insms"
  245. .br
  246. This Makefile fragment uses
  247. .B sz
  248. to issue commands to Professional-YAM to change current disk and directory.
  249. Next,
  250. .B sz
  251. transfers the
  252. .I .me
  253. files from the $YD directory, commanding the receiver to overwrite the old files
  254. and to convert from Unix end of line conventions to PC-DOS conventions.
  255. The third line transfers some
  256. .I .exe
  257. files.
  258. The fourth and fifth lines command Pro-YAM to
  259. change directory and execute a PC-DOS batch file
  260. .I insms .
  261. Since the batch file takes considerable time, the
  262. .B "-i"
  263. form is used to allow
  264. .B sz
  265. to exit immediately.
  266.  
  267. .B "XMODEM File Transfer"
  268. .br
  269. $
  270. .B "sz -Xa foo.c"
  271. .br
  272. .B "ESC"
  273. .br
  274. .B "rx foo.c"
  275. .br
  276. The above three commands transfer a single file
  277. from Unix to a PC and Crosstalk XVI 3.6,
  278. translating Unix newlines to DOS CR/LF.
  279.  
  280. .SH SEE ALSO
  281. rz(omen),
  282. ZMODEM.DOC,
  283. YMODEM.DOC,
  284. Professional-YAM manual,
  285. IMP(CP/M),
  286. cu(1),
  287. sq(omen),
  288. todos(omen),
  289. tocpm(omen),
  290. tomac(omen),
  291. yam(omen)
  292.  
  293. Compile time options required for various operating systems are described in
  294. the source file.
  295. .SH "VMS VERSION"
  296. The VMS version does not transmit the file date.
  297. The VMS version calculates the file length by reading the file
  298. and counting the bytes.
  299.  
  300. The VMS version does not support YMODEM-g or ZMODEM.
  301.  
  302. When VMS is lightly loaded, the response time may be too quick for MODEM7
  303. unless the MODEM7
  304. .B "q"
  305. modifier is used.
  306.  
  307. The VMS C standard i/o package and RMS sometimes interact to modify
  308. file contents unexpectedly.
  309. .SH FILES
  310. sz.c, rbsb.c, zm.c, zmodem.h source files
  311.  
  312. /tmp/szlog stores debugging output (sz -vv)
  313. .SH "TESTING FEATURE"
  314. The command "sz -T file"
  315. exercises the
  316. .B Attn
  317. sequence error recovery by commanding
  318. errors with unterminated packets.
  319. The receiving program should complain five times about
  320. binary data packets being too long.
  321. Each time
  322. .B sz
  323. is interrupted,
  324. it should send a ZDATA header followed by another defective packet.
  325. If the receiver does not detect five long data packets,
  326. the
  327. .B Attn
  328. sequence is not interrupting the sender, and the
  329. .B Myattn
  330. string in
  331. .B sz.c
  332. must be modified.
  333.  
  334. After 5 packets,
  335. .B sz
  336. stops the "transfer" and
  337. prints the total number of characters "sent" (Tcount).
  338. The difference between Tcount and 5120 represents the number of characters
  339. stored in various buffers when the Attn sequence is generated.
  340. .SH BUGS
  341. XMODEM transfers add up to 127 spurious bytes per file.
  342.  
  343. Circular buffering and a ZMODEM sliding window should be used
  344. when input is from pipes instead of acknowledging frames each 1024 bytes.
  345. If no files can be opened,
  346. .B sz
  347. sends a ZMODEM command to echo a suitable complaint;
  348. it should check for the presence of at least one accessible file before
  349. getting hot and bothered.
  350. The test mode leaves a zero length file on the receiving system.
  351.