Penguin
Annotated edit history of sz(1) version 3, including all changes. View license author blame.
Rev Author # Line
1 perry 1 SZ
2 !!!SZ
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 SECURITY
7 ENVIRONMENT
8 EXAMPLES
9 ERROR MESSAGES
10 SEE ALSO
11 VMS VERSION
12 FILES
13 TESTING FEATURE
14 BUGS
15 ----
16 !!NAME
17
18
19 sx, sb, sz - XMODEM, YMODEM, ZMODEM file send
20 !!SYNOPSIS
21
22
23 sz [[-__+8abdefkLlNnopqTtuvyY__] ''file ...''
24 sb [[-__adfkqtuv__] ''file ...''
25 sx [[-__akqtuv__] ''file''
26 sz [[-__oqtv__] __-c COMMAND__
27 sz [[-__oqtv__] __-i COMMAND__
28 sz -TT
29 !!DESCRIPTION
30
31
32 __Sz__ uses the ZMODEM, YMODEM or XMODEM error correcting
33 protocol to send one or more files over a dial-in serial
34 port to a variety of programs running under PC-DOS, CP/M,
35 Unix, VMS, and other operating systems.
36
37
38 While ''rz'' is smart enough to be called from
39 ''cu(1),'' very few versions of ''cu(1)'' are smart
40 enough to allow ''sz'' to work properly. Unix flavors of
41 Professional-YAM are available for such dial-out
42 application.
43
44
45 __Sz__ sends one or more files with ZMODEM
46 protocol.
47
48
49 ZMODEM greatly simplifies file transfers compared to XMODEM.
50 In addition to a friendly user interface, ZMODEM provides
51 Personal Computer and other users an efficient, accurate,
52 and robust file transfer method.
53
54
55 ZMODEM provides complete __END-TO-END__ data integrity
56 between application programs. ZMODEM's 32 bit CRC catches
57 errors that sneak into even the most advanced
58 networks.
59
60
2 perry 61 Advanced file management features include !AutoDownload
1 perry 62 (Automatic file Download initiated without user
63 intervention), Display of individual and total file lengths
64 and transmission time estimates, Crash Recovery, selective
65 file transfers, and preservation of exact file date and
66 length.
67
68
69 Output from another program may be piped to __sz__ for
70 transmission by denoting standard input with
71 __
72 ls -l | sz -
73 The program output is transmitted with the filename
74 sPID.sz where PID is the process ID of the __sz__
75 program. If the environment variable __ONAME__ is set,
76 that is used instead. In this case, the Unix command:
77 ls -l | ONAME=con sz -ay -
78 will send a
79 -y__ option instructs the receiver to open
80 the file for writing unconditionally. The __-a__ option
81 causes the receiver to convert Unix newlines to PC-DOS
82 carriage returns and linefeeds.
83 __Sb__ batch sends one or more files with YMODEM or
84 ZMODEM protocol. The initial ZMODEM initialization is not
85 sent. When requested by the receiver, __sb__ supports
86 __YMODEM-g__ with
87 __YMODEM-g__ (Professional-YAM __g__ option) increases
88 throughput over error free channels (direct connection,
89 X.PC, etc.) by not acknowledging each transmitted
90 sector.
91 On Unix systems, additional information
92 about the file is transmitted. If the receiving program uses
93 this information, the transmitted file length controls the
94 exact number of bytes written to the output dataset, and the
95 modify time and file mode are set accordingly.
96 __Sx__ sends a single ''file'' with __XMODEM__
97 or __XMODEM-1k__ protocol (sometimes incorrectly called
98 __
99 If __sz__ is invoked with $SHELL set and iff that
100 variable contains the string ''rsh'' , ''rbash'' or
101 ''rksh'' (restricted shell), __sz__ operates in
102 restricted mode. Restricted mode restricts pathnames to the
103 current directory and PUBDIR (usually /usr/spool/uucppublic)
104 and/or subdirectories thereof.
105 The fourth form sends a single COMMAND to a ZMODEM
106 receiver for execution. __Sz__ exits with the COMMAND
107 return value. If COMMAND includes spaces or characters
108 special to the shell, it must be quoted.
109 The fifth form sends a single COMMAND to a ZMODEM
110 receiver for execution. __Sz__ exits as soon as the
111 receiver has correctly received the command, before it is
112 executed.
113 The sixth form (sz -TT) attempts to output all 256 code
114 combinations to the terminal. In you are having difficulty
115 sending files, this command lets you see which character
116 codes are being eaten by the operating system.
117 If __sz__ is invoked with stdout and stderr to
118 different datasets, Verbose is set to 2, causing frame by
119 frame progress reports to stderr. This may be disabled with
120 the __q__ option.
121 The meanings of the available options are:
122 __-+,
123 --append__
124
125
126 Instruct the receiver to append transmitted data to an
127 existing file (ZMODEM only).
128
129
130 __-2, --twostop__
131
132
133 use two stop bits (if possible). Do not use this unless you
134 know what you are doing.
135
136
137 __-8, --try-8k__
138
139
140 Try to go up to 8KB blocksize. This is incompatible with
141 standard zmodem, but a common extension in the bbs world.
142 (ZMODEM only).
143
144
145 __--start-8k__
146
147
148 Start with 8KB blocksize. Like --try-8k.
149
150
151 __-a, --ascii__
152
153
154 Convert NL characters in the transmitted file to CR/LF. This
155 is done by the sender for XMODEM and YMODEM, by the receiver
156 for ZMODEM.
157
158
159 __-b, --binary__
160
161
162 (ZMODEM) Binary override: transfer file without any
163 translation.
164
165
166 __-B NUMBER, --bufsize NUMBER__
167
168
169 Use a readbuffer of __NUMBER__ bytes. Default ist 16384,
170 which should be enough for most situations. If you have a
171 slow machine or a bad disk interface or suffer from other
172 hardware problems you might want to increase the buffersize.
173 __-1__ or __auto__ use a buffer large enough to buffer
174 the whole file. Be careful with this option - things
175 normally get worse, not better, if the machine starts to
176 swap.
177
178
179 Using this option turns of memory mapping of the input file.
180 This increases memory and cpu usage.
181
182
183 __-c COMMAND, --command COMMAND__
184
185
186 Send COMMAND to the receiver for execution, return with
187 COMMANDs exit status.
188
189
190 __-C N, --command-tries N__
191
192
193 Retry to send command N times (default: 11).
194
195
196 __-d, --dot-to-slash__
197
198
199 Change all instances of
200
201
202 This option enables the __--full-path__
203 option.
204
205
206 __--delay-startup N__
207
208
209 Wait __N__ seconds before doing anything.
210
211
212 __-e, --escape__
213
214
215 Escape all control characters; normally XON, XOFF, DLE,
216 CR-@-CR, and Ctrl-X are escaped.
217
218
219 Force the sender to rename the new file if a file with the
220 same
221
222
223 name already exists.
224
225
226 __-f, --full-path__
227
228
229 Send Full pathname. Normally directory prefixes are stripped
230 from the transmitted filename.
231
232
233 This is also turned on with to __--dot-to-slash__
234 option.
235
236
237 __-h, --help__
238
239
240 give help.
241
242
243 __-i COMMAND, --immediate-command COMMAND__
244
245
246 Send COMMAND to the receiver for execution, return
247 immediately upon the receiving program's successful recption
248 of the command.
249
250
251 __-k, --1k__
252
253
254 (XMODEM/YMODEM) Send files using 1024 byte blocks rather
255 than the default 128 byte blocks. 1024 byte packets speed
256 file transfers at high bit rates. (ZMODEM streams the data
257 for the best possible throughput.)
258
259
260 __-L N, --packetlen N__
261
262
263 Use ZMODEM sub-packets of length N. A larger N (32
264
265
266 __-m N, --min-bps N__
267
268
269 Stop transmission if BPS-Rate (Bytes Per Second) falls below
270 N for a certain time (see --min-bps-time
271 option).
272
273
274 __-M N, --min-bps-time__
275
276
277 Used together with --min-bps. Default is 120
278 (seconds).
279
280
281 __-l N, --framelen N__
282
283
284 Wait for the receiver to acknowledge correct data every
285 __N__ (32
286 __
287
288
289 __-n, --newer__
290
291
292 (ZMODEM) Send each file if destination file does not exist.
293 Overwrite destination file if source file is newer than the
294 destination file.
295
296
297 __-N, --newer-or-longer__
298
299
300 (ZMODEM) Send each file if destination file does not exist.
301 Overwrite destination file if source file is newer or longer
302 than the destination file.
303
304
305 __-o, --16-bit-crc__
306
307
308 (ZMODEM) Disable automatic selection of 32 bit
309 CRC.
310
311
312 __-O, --disable-timeouts__
313
314
315 Disable read timeout handling. This makes lsz hang if the
316 other side doesn't send anything, but increases performance
317 (not much) and decreases system load (reduces number of
318 system calls by about 50 percent).
319
320
321 Use this option with care.
322
323
324 __-p, --protect__
325
326
327 (ZMODEM) Protect existing destination files by skipping
328 transfer if the destination file exists.
329
330
331 __-q, --quiet__
332
333
334 Quiet suppresses verbosity.
335
336
337 __-R, --restricted__
338
339
340 Restricted mode: restricts pathnames to the current
341 directory and PUBDIR (usually /usr/spool/uucppublic) and/or
342 subdirectories thereof.
343
344
345 __-r, --resume__
346
347
348 (ZMODEM) Resume interrupted file transfer. If the source
349 file is longer than the destination file, the transfer
350 commences at the offset in the source file that equals the
351 length of the destination file.
352
353
354 __-s HH:MM, --stop-at HH:MM__
355
356
357 Stop transmission at __HH__ hours, __MM__ minutes.
358 Another variant, using __+N__ instead of __HH:MM,__
359 stops transmission in __N__ seconds.
360
361
362 __-S, --timesync__
363
364
365 enable timesync protocol support. See timesync.doc for
366 further information.
367
368
369 This option is incompatible with standard zmodem. Use it
370 with care.
371
372
373 __--syslog[[=off]__
374
375
376 turn syslogging on or off. the default is set at configure
377 time. This option is ignored if no syslog support is
378 compiled in.
379
380
381 __-t TIM, --timeout TIM__
382
383
384 Change timeout to ''TIM'' tenths of seconds.
385
386
387 __-T, --turbo__
388
389
390 Do not escape certain characters (^P, ^P|0x80, telenet
391 escape sequence [[CR + @]). This improves performance by
392 about 1 percent and shouldn't hurt in the normal case (but
393 be careful - ^P might be useful if connected through a
394 terminal server).
395
396
397 __--tcp__
398
399
400 Try to initiate a TCP/IP connection. lsz will ask the
401 receiving zmodem to open a TCP/IP connection. All
402 handshaking (which address / port to use) will be done by
403 the zmodem programs.
404
405
406 You will normally not want to use this option as lrzsz is
407 the only zmodem which understands what to do (private
408 extension). You might want to use this option if the two
409 programs are connected (stdin/out) over a slow or bad (not
410 8bit clean) network connection.
411
412
413 Use of this option imposes a security risk, somebody else
414 could connect to the port in between. See __SECURITY__
415 for details.
416
417
418 __--tcp-client ADDRESS:PORT__
419
420
421 Act as a tcp/ip client: Connect to the given
422 port.
423
424
425 See __--tcp-server__ for more information.
426
427
428 __--tcp-server__
429
430
431 Act as a server: Open a socket, print out what to do, wait
432 for connection.
433
434
435 You will normally not want to use this option as lrzsz is
436 the only zmodem which understands what to do (private
437 extension). You might want to use this if you have to use
438 zmodem (for which reason whatever), and cannot use the
439 __--tcp__ option of ''lsz'' (perhaps because your
440 telnet doesn't allow to spawn a local program with
441 stdin/stdout connected to the remote side).
442
443
444 If you use this option you have to start ''lsz'' with the
445 __--tcp-client ADDRESS:PORT__ option. ''lrz will print
446 the address and port on startup.''
447
448
449 Use of this option imposes a security risk, somebody else
450 could connect to the port in between. See __SECURITY__
451 for details.
452
453
454 __-u__
455
456
457 Unlink the file after successful transmission.
458
459
460 __-U, --unrestrict__
461
462
463 Turn off restricted mode (this is not possible if running
464 under a restricted shell).
465
466
467 __-w N, --windowsize N__
468
469
470 Limit the transmit window size to N bytes
471 (ZMODEM).
472
473
474 __-v, --verbose__
475
476
477 Verbose output to stderr. More v's generate more
478 output.
479
480
481 __-X, --xmodem__
482
483
484 use XMODEM protocol.
485
486
487 __-y, --overwrite__
488
489
490 Instruct a ZMODEM receiving program to overwrite any
491 existing file with the same name.
492
493
494 __-Y, --overwrite-or-skip__
495
496
497 Instruct a ZMODEM receiving program to overwrite any
498 existing file with the same name, and to skip any source
499 files that do have a file with the same pathname on the
500 destination system.
501
502
503 __--ymodem__
504
505
506 use ZMODEM protocol.
507
508
509 __-Z, --zmodem__
510
511
512 use ZMODEM protocol.
513 !!SECURITY
514
515
516 Restricted mode restricts pathnames to the current directory
517 and PUBDIR (usually /var/spool/uucppublic) and/or
518 subdirectories thereof, and disables remote command
519 execution.
520
521
522 Restricted mode is entered if the __R__ option is given
523 or if lsz detects that it runs under a restricted shell or
524 if the environment variable ZMODEM_RESTRICTED is
525 found.
526
527
528 Restricted mode can be turned of with the __U__ option if
529 not running under a restricted shell.
530
531
532 Use of the
533
534
535 __--tcp-client__ or __--tcp-server__ options imposes a
536 security risk, as somebody else could connect to the port
537 before you do it, and grab your data. If there's strong
538 demand for a more secure mode i might introduce some sort of
539 password challenge.
540 !!ENVIRONMENT
541
542
543 __ZNULLS__
544
545
546 may be used to specify the number of nulls to send before a
547 ZDATA frame.
548
549
550 __SHELL__
551
552
553 lsz recognizes a restricted shell if this variable includes
554 ''rsh'' or ''rksh''
555
556
557 __ZMODEM_RESTRICTED__
558
559
560 lrz enters restricted mode if the variable is
561 set.
562
563
564 __TMPDIR__
565
566
567 If this environment variable is set its content is used as
568 the directory to place in the answer file to a
569 __timesync__ request. __TMP__ Used instead of TMPDIR
570 if TMPDIR is not set. If neither TMPDIR nor TMP is set /tmp
571 will be used.
572 !!EXAMPLES
573
574
575 __ZMODEM File Transfer__ (Unix to
576 DSZ/ZCOMM/Professional-YAM)__
577 % sz -a *.c__
578 This single command transfers all .c files in the current
579 Unix directory with conversion (__-a__) to end of line
580 conventions appropriate to the receiving environment. With
2 perry 581 ZMODEM !AutoDownload enabled, Professional-YAM and ZCOMM will
1 perry 582 automatically recieve the files after performing a security
583 check.
584
585
586 __% sz -Yan *.c *.h__
587 Send only the .c and .h files that exist on both systems,
588 and are newer on the sending system than the corresponding
589 version on the receiving system, converting Unix to DOS text
590 format.__
591 $ sz -Yan file1.c file2.c file3.c foo.h baz.h__ (for
592 VMS)
593
594
595 __ZMODEM Command Download__ (Unix to
596 Professional-YAM)
597 cpszall:all sz -c
598 This Makefile fragment uses __sz__ to issue commands to
599 Professional-YAM to change current disk and directory. Next,
600 __sz__ transfers the ''.me'' files from the $YD
601 directory, commanding the receiver to overwrite the old
602 files and to convert from Unix end of line conventions to
603 PC-DOS conventions. The third line transfers some
604 ''.exe'' files. The fourth and fifth lines command
605 Pro-YAM to change directory and execute a PC-DOS batch file
606 ''insms .'' Since the batch file takes considerable time,
607 the __-i__ form is used to allow __sz__ to exit
608 immediately.
609
610
611 __XMODEM File Transfer__ (Unix to Crosstalk)
612 % __sx -a foo.c
613 ESC
614 rx foo.c__
615 The above three commands transfer a single file from Unix to
616 a PC and Crosstalk with ''sz'' translating Unix newlines
617 to DOS CR/LF. This combination is much slower and far less
618 reliable than ZMODEM.
619 !!ERROR MESSAGES
620
621
622 !!SEE ALSO
623
624
625 rz(omen), ZMODEM.DOC, YMODEM.DOC, Professional-YAM,
626 crc(omen), sq(omen), todos(omen), tocpm(omen), tomac(omen),
627 yam(omen)
628
629
630 Compile time options required for various operating systems
631 are described in the source file.
632 !!VMS VERSION
633
634
635 The VMS version does not support wild cards. Because of VMS
636 DCL, upper case option letters muse be represented by \
637 proceding the letter.
638
639
640 The current VMS version does not support XMODEM, XMODEM-1k,
641 or YMODEM.
642
643
644 VMS C Standard I/O and RMS may interact to modify the file
645 contents.
646 !!FILES
647
648
649 32 bit CRC code courtesy Gary S. Brown.
650
651
652 sz.c, crctab.c, rbsb.c, zm.c, zmodem.h Unix source
653 files
654
655
656 sz.c, crctab.c, vrzsz.c, zm.c, zmodem.h, vmodem.h,
657 vvmodem.c, VMS source files.
658
659
660 /tmp/szlog stores debugging output (sz -vv) (szlog on
661 VMS).
662 !!TESTING FEATURE
663
664
665 The command Attn__
666 sequence error recovery by commanding errors with
667 unterminated packets. The receiving program should complain
668 five times about binary data packets being too long. Each
669 time __sz__ is interrupted, it should send a ZDATA header
670 followed by another defective packet. If the receiver does
671 not detect five long data packets, the __Attn__ sequence
672 is not interrupting the sender, and the __Myattn__ string
673 in __sz.c__ must be modified.
674
675
676 After 5 packets, __sz__ stops the
677 __
678 !!BUGS
679
680
681 Calling ''sz'' from most versions of cu(1) doesn't work
682 because cu's receive process fights ''sz'' for characters
683 from the modem.
684
685
686 On at least one BSD system, sz would hang or exit when it
687 got within a few kilobytes of the end of file. Using the
688
689
690 Programs that do not properly implement the specified file
691 transfer protocol may cause ''sz'' to
692 ''
693
694
695 Many programs claiming to support YMODEM only support XMODEM
696 with 1k blocks, and they often don't get that quite
697 right.
698
699
700 XMODEM transfers add up to 127 garbage bytes per file.
701 XMODEM-1k and YMODEM-1k transfers use 128 byte blocks to
702 avoid extra padding.
703
704
705 YMODEM programs use the file length transmitted at the
706 beginning of the transfer to prune the file to the correct
707 length; this may cause problems with source files that grow
708 during the course of the transfer. This problem does not
709 pertain to ZMODEM transfers, which preserve the exact file
710 length unconditionally.
711
712
713 Most ZMODEM options are merely passed to the receiving
714 program; some do not implement all these
715 options.
716
717
718 Circular buffering and a ZMODEM sliding window should be
719 used when input is from pipes instead of acknowledging
720 frames each 1024 bytes. If no files can be opened, __sz__
721 sends a ZMODEM command to echo a suitable complaint; perhaps
722 it should check for the presence of at least one accessible
723 file before getting hot and bothered. The test mode leaves a
724 zero length file on the receiving system.
725
726
727 A few high speed modems have a firmware bug that drops
728 characters when the direction of high speed transmissson is
729 reversed. The environment variable ZNULLS may be used to
730 specify the number of nulls to send before a ZDATA frame.
731 Values of 101 for a 4.77 mHz PC and 124 for an AT are
732 typical.
733 ----
3 JakobEriksson 734
735
736
737 -------------------------------------
738
739
740
741 Yes, but where can I find timesync.doc?
742 // JakobEriksson
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.