source: trunk/minix/man/man1/sz.1@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 7.2 KB
Line 
1.TH SZ 1
2.SH NAME
3sz \- send a file using the zmodem protocol
4.SH SYNOPSIS
5\fBsz\fR [\fB\-LNbdefnopqruvy+\fR]\fR [\fB\-ci \fIcommand\fR] [\fB\-Ll\fR n\fR] [\fB\-t \fItimeout\fR]\fR
6.br
7.de FL
8.TP
9\\fB\\$1\\fR
10\\$2
11..
12.de EX
13.TP 20
14\\fB\\$1\\fR
15# \\$2
16..
17.SH OPTIONS
18.FL "\-L" "Use \fIn\fR-byte packets"
19.FL "\-N" "Overwrite if source is newer/longer"
20.FL "\-b" "Binary file"
21.FL "\-c" "Send command for execution"
22.FL "\-d" "Convert dot to slash in names"
23.FL "\-e" "Escape for all control characters"
24.FL "\-f" "Send full path name"
25.FL "\-i" "Send command and return immediately"
26.FL "\-l" "Flow control every \fIn\fR packets"
27.FL "\-n" "Overwrite destination if source is newer"
28.FL "\-o" "Use old (16-bit) checksum"
29.FL "\-p" "Protect file if it already exists"
30.FL "\-q" "Quiet; opposite of verbose"
31.FL "\-r" "Resume interrupt file transfer"
32.FL "\-t" "Set \fItimeout\fR in tenths of a second"
33.FL "\-u" "Unlink file after successful transmission"
34.FL "\-v" "Verbose; opposite of quiet"
35.FL "\-y" "Yes, clobber existing files"
36.FL "\-+" "Append to an existing file"
37.SH EXAMPLES
38.EX "sz file </dev/tty01 >/dev/tty01" "Send \fIfile\fR"
39.SH DESCRIPTION
40.PP
41XMODEM, YMODEM, and ZMODEM are a family of protocols that are widely used
42is the \s-2MS-DOS\s0 world for transferring information reliably from one
43computer to another. In all of these protocols, a series of bytes are sent
44from one computer to the other, and then an acknowledgement is sent back
45to confirm correct reception. Checksums are used to detect errors so that
46transmission is reliable even in the face of noisy telephone lines.
47\fISz\fR is a program that sends a file sent from another computer using the
48zmodem protocol.
49The file can be received using \fIrz\fR.
50.PP
51\fISz\fR uses the ZMODEM error correcting
52protocol to send one or more files over a dial-in serial
53port to a variety of programs running under
54\s-1MINIX 3\s-1,
55\s-2UNIX\s+2,
56\s-2MS-DOS\s0, \s-2CP/M\s0, \s-2VMS\s0, and other operating systems.
57It is the successor to XMODEM and YMODEM.
58.PP
59ZMODEM greatly simplifies file transfers compared to XMODEM.
60In addition to a friendly user interface, ZMODEM provides
61Personal Computer and other users an efficient, accurate,
62and robust file transfer method.
63.PP
64ZMODEM provides complete end-to-end data integrity between
65application programs. ZMODEM's 32 bit CRC catches errors
66that sneak into even the most advanced networks.
67.PP
68Output from another program may be piped to \fIsz\fR for
69transmission by denoting standard input with \-:
70.PP
71.B " ""ls \-l | sz \-"
72.PP
73The program output is transmitted with the filename \fIsPID.sz\fR
74where PID is the process ID of the \fIsz\fR program. If the
75environment variable \fIONAME\fR is set, that is used instead. In
76this case, the command:
77.PP
78.B " ""ls \-l | ONAME=con sz \-ay \-"
79.PP
80will send a \&'file\&' to the PC-DOS console display.
81The \fB\-y\fR option instructs the receiver to open the file for writing
82unconditionally.
83The \fB\-a\fR option causes the receiver to
84convert
85\s-2UNIX\s+2
86newlines to PC-DOS carriage returns and linefeeds.
87On
88\s-2UNIX\s+2
89systems, additional information about the file is
90transmitted. If the receiving program uses this
91information, the transmitted file length controls the exact
92number of bytes written to the output dataset, and the
93modify time and file mode are set accordingly.
94.PP
95If \fIsz\fR is invoked with $SHELL set and if that variable
96contains the string \fIrsh\fR or \fIrksh\fR (restricted shell), \fIsz\fR
97operates in restricted mode. Restricted mode restricts
98pathnames to the current directory and \fIPUBDIR\fR (usually
99\fI/usr/spool/uucppublic\fR) and/or subdirectories thereof.
100.PP
101The options and flags available are:
102.in +0.25i
103.ti -0.25i
104.B \-+
105.br
106Instruct the receiver to append transmitted data to an existing file.
107.ti -0.25i
108.B \-a
109.br
110Convert NL characters in the transmitted file to CR/LF.
111This is done by the sender for XMODEM and YMODEM, by the receiver for ZMODEM.
112.ti -0.25i
113.B \-b
114.br
115Binary override: transfer file without any translation.
116.ti -0.25i
117.B \-c
118.br
119Send COMMAND (follows \fIc\fR) to the receiver for execution, return with
120COMMAND's exit status.
121.ti -0.25i
122.B \-d
123.br
124Change all instances of \&'.\&' to \&'/\&' in the transmitted
125pathname. Thus, C.omenB0000 (which is unacceptable to
126\s-2MS-DOS\s0 or CP/M) is transmitted as C/omenB0000. If the
127resultant filename has more than 8 characters in the
128stem, a \&'.\&' is inserted to allow a total of eleven.
129.ti -0.25i
130.B \-e
131.br
132Escape all control characters; normally XON, XOFF, DLE,
133CR-@-CR, and Ctrl-X are escaped.
134.ti -0.25i
135.B \-f
136.br
137Send Full pathname. Normally directory prefixes are stripped from
138the transmitted filename.
139.ti -0.25i
140.B \-i
141.br
142Send COMMAND (follows \fIi\fR) to the receiver for execution, return
143Immediately upon the receiving program's successful reception of the command.
144.ti -0.25i
145.B \-L
146.br
147Use ZMODEM sub-packets of length \fIn\fR (follows \fIL\fR).
148A larger \fIn\fR (32 <= \fIn\fR <= 1024) gives slightly higher throughput, a
149smaller one speeds error recovery. The default is 128 below 300
150baud, 256 above 300 baud, or 1024 above 2400 baud.
151.ti -0.25i
152.B \-l
153.br
154Wait for the receiver to acknowledge correct data every
155\fIn\fR (32 <= \fIn\fR <= 1024) characters.
156This may be used to avoid network overrun when XOFF flow control is lacking.
157.ti -0.25i
158.B \-n
159.br
160Send each file if destination file does not exist.
161Overwrite destination file if source file is newer than the destination file.
162.ti -0.25i
163.B \-N
164.br
165 Send each file if destination file does not exist. Overwrite destination
166file if source file is newer or longer than the destination file.
167.ti -0.25i
168.B \-o
169.br
170Disable automatic selection of 32 bit CRC.
171.ti -0.25i
172.B \-p
173.br
174Protect existing destination files by skipping transfer if the destination
175file exists.
176.ti -0.25i
177.B \-q
178.br
179Quiet suppresses verbosity.
180.ti -0.25i
181.B \-r
182.br
183Resume interrupted file transfer. If the source file is longer than the
184destination file, the transfer commences at the offset in the source file
185that equals the length of the destination file.
186.ti -0.25i
187.B \-t
188.br
189Change timeout.
190The timeout, in tenths of seconds, follows, the \fB\-t\fR flag.
191.ti -0.25i
192.B \-u
193.br
194Unlink the file after successful transmission.
195.ti -0.25i
196.B \-w
197.br
198Limit the transmit window size to \fIn\fR bytes (\fIn follows \fB(enw\fR).
199.ti -0.25i
200.B \-v
201.br
202Verbose causes a list of file names to be appended to \fI/tmp/szlog\fR.
203.ti -0.25i
204.B \-y
205.br
206Instruct a ZMODEM receiving program to overwrite any existing file with the
207same name.
208.ti -0.25i
209.B \-Y
210.br
211Instruct a ZMODEM receiving program to overwrite any existing file with the
212same name, and to skip any source files that do have a file with the same
213pathname on the destination system.
214.in -0.25i
215.SS "Examples"
216.PP
217Below are some examples of the use of \fIsz\fR.
218.PP
219.B " ""sz \-a \d\s+2*\s0\u.c"
220.PP
221This single command transfers all .c files in the current
222directory with conversion (\fB\-a\fR) to end-of-line
223conventions appropriate to the receiving environment.
224.sp
225.B " ""sz \-Yan \d\s+2*\s0\u.c \d\s+2*\s0\u.h"
226.PP
227.LP
228Send only the \fI.c\fR and \fI.h\fR files that exist on both systems,
229and are newer on the sending system than the corresponding
230version on the receiving system, converting
231\s-1MINIX 3\s-1
232to \s-2MS-DOS\s0 text format.
233.SH "SEE ALSO"
234.BR rz (1),
235.BR term (1).
Note: See TracBrowser for help on using the repository browser.