home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
260_01
/
sz.doc
< prev
next >
Wrap
Text File
|
1988-02-25
|
7KB
|
163 lines
SZ(1)OMEN SZ(1)OMEN
NAME
sz - XMODEM, YMODEM, ZMODEM Batch file Send
SYNOPSIS
sz [-2+aBbdefkLlNnquvYy] [-s<speed>] [-] file ...
sz [-2+aBbdefkLlNnquvXy] [-s<speed>] [-] file
sz [-2Beqv] [-s<speed>] -c COMMAND
DESCRIPTION
Sz uses the ZMODEM, YMODEM or XMODEM error correcting protocol
to send one or more files over a serial port to a variety of
programs running under PC-DOS, CP/M, Unix, VMS, and other
operating systems.
The first form of sz sends one or more files with ZMODEM or
YMODEM batch protocol. Normally, only the file name part of
the pathname is transmitted. On Unix systems, additional
information about the file is transmitted. If the receiving
program uses this information, the transmitted file length
controls the exact number of bytes written to the output dataset,
and the modify time and file mode are set accordingly.
The a option causes the receiver to convert Unix newlines to
PC-DOS carriage returns and linefeeds.
The second form of uses the flag -X to send a single file with
XMODEM or XMODEM-1k protocol. The user must supply the file name
to both sending and receiving programs.
The third form sends a single COMMAND to the receiver for execution.
Sz exits with the COMMAND return value. If COMMAND includes spaces
or characters special to the shell, it must be quoted.
If sz 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 q option. The meanings of
the available options are:
+ Instruct the receiver to append transmitted data to an
existing file (ZMODEM only).
2 Use COM2 instead of COM1 (MS-DOS only). By default,
COM1 is used.
a Convert NL characters in the transmitted file to CR/LF.
This is done by the sender for XMODEM and YMODEM, by the
receiver for ZMODEM.
b (ZMODEM) Binary override: transfer file without any
translation.
c COMMAND Send COMMAND to the receiver for execution, return
with COMMAND's exit status.
d Change all instances of "." to "/" in the transmitted
pathname. Thus, C.omenB0000 (which is unacceptable to
MSDOS or CP/M) is transmitted as C/omenB0000. If the
resultant filename has more than 8 characters in the stem,
a "." is inserted to allow a total of eleven.
f Normally directory prefixes are stripped from the
transmitted filename.
i COMMAND Send COMMAND to the receiver for execution, return
Immediately upon the receiving program's successful
reception of the command.
k (XMODEM/YMODEM) Send files using 1024 byte blocks rather
than the default 128 byte blocks. 1024 byte packets speed
file transfers at high bit rates. (ZMODEM streams the data
for the best possible throughput.)
L N Use ZMODEM sub-packets of length N. A larger N
(32 <= N <= 1024) gives slightly higher throughput, a
smaller N speeds error recovery. The default is 128 below
300 baud, 256 above 300 baud, or 1024 above 2400 baud.
l N Wait for the receiver to acknowledge correct data every
(32 <= N <= 1024) characters. This may be used to avoid
network overrun when XOFF flow control is lacking.
n (ZMODEM) Send each file if destination file does not exist.
Overwrite destination file if source file is newer or longer
than the destination file.
N (ZMODEM) Send each file if destination file does not exist.
Overwrite destination file if source file has different
length or date.
o (ZMODEM) Disable automatic selection of 32 bit CRC.
p (ZMODEM) Protect existing destination files by skipping
transfer if the destination file exists.
q Quiet suppresses verbosity.
r Resume interrupted file transfer. If the source file is
longer than the destination file, the transfer commences
at the offset in the source file that equals the length
of the destination file.
t tim Change timeout to tim tenths of seconds.
u Unlink the file after successful transmission.
v Verbose causes a list of file names to be appended to
/tmp/szlog. More v's generate more output.
X Send a single file with XMODEM or XMODEM-1k protocol.
Y Send a single file with YMODEM batch protocol.
y Instruct a ZMODEM receiving program to overwrite any
existing file with the same name.
SEE ALSO
rz(omen), ZMODEM.DOC, YMODEM.DOC, Professional-YAM manual,
IMP(CP/M), cu(1), sq(omen), todos(omen), tocpm(omen),
tomac(omen), yam(omen)
BUGS
XMODEM transfers add up to 127 garbage bytes per file (1023 bytes
with XMODEM-k). Most YMODEM programs use the file length transmitted
at the beginning of the transfer to prune the file to the correct
length; this may cause problems with source files that grow during
the course of the transfer. This problem does not pertain to ZMODEM
transfers, which preserve the exact file length unconditionally.
Most ZMODEM options are merely passed to the receiving program;
some do not implement all these options.
Circular buffering and a ZMODEM sliding window should be used when
input is from pipes instead of acknowledging frames each 1024 bytes.
If no files can be opened, sz sends a ZMODEM command to echo a
suitable complaint; perhaps it should check for the presence of
at least one accessible file before getting hot and bothered.
The test mode leaves a zero length file on the receiving system.
Some high speed modems have a firmware bug that drops characters
when the direction of high speed transmissson is reversed.
The environment variable ZNULLS may be used to specify the number
of nulls to send before a ZDATA frame. Values of 101 for a 4.77 mHz
PC and 124 for an AT are typical.
Some versions of Unix cu(1) do not operate properly with this program.