Book HomeRunning LinuxSearch this book

H.3. Summary of rz and sz Options

Because of the prevailing poor state of RZSZ documentation in the standard Linux distributions and because RZSZ tools don't have interactive help, we're providing you with summaries of the important flags for using the Zmodem protocol for file transfer. However, you should get the manual pages and possibly other documentation you need from an FTP site or a BBS; see the earlier section "Section H.1, "Getting RZSZ"." When you use RZSZ on another system, you should be aware that the utilities may have been modified to support additional features or to disable standard features. Check the local documentation.

The rz utility recognizes the following flags:

-+

Appends to any existing file of the same name, rather than overwrite it. (This can cause a malformed file if you are retransmitting an interrupted Zmodem transfer.)

-a

Receives ASCII text and converts files to Unix newline conventions, stripping carriage returns and all characters beginning with a Ctrl-Z (the end-of-file character for the CP/M OS).

-b

Receives binary and saves the file in exactly the form it was received.

-D

Discards output. It sends data to /dev/null; this is useful for tests.

-e

Escapes the control characters. By default, sz escapes XON, XOFF, and (in older versions) DLE. This option forces the sending Zmodem program to escape others as well.

-p

Protects destination files. This option skips Zmodem transfer if a destination file of the same name already exists. (Be aware that this prevents completion of an interrupted Zmodem transfer.)

-q

Quiet exchange. Suppresses informational messages to standard output.

-t n

Changes timeout to n tenths of seconds.

-v

Turns on verbose. Not like a typical Unix utility "verbose." This flag causes a list of transferred filenames to be appended to a log file, normally /tmp/rzlog. If multiple -v flags are used, additional information is also stored to the log.

Now for sz. Most sz options are simply passed to the receiving program that performs the operation. Not all Zmodem receiving programs can execute the requested options. If sz is invoked with the $SHELL environment variable set to a restricted shell (e.g., rsh), sz restricts pathnames to the current directory and to the value of the $PUBDIR variable if set (often used with UUCP), as well as subdirectories of these directories.

The meanings of the most common sz options are:

-+

Has the Zmodem receiver utility append the transmitted data to an existing file.

-a

Sends ASCII text and converts each newline character (Unix style) in the transmitted file to a carriage return/linefeed (DOS style).

-b

Transfers the file without any translation and tells the receiving Zmodem program not to make any translation. This option is used for binary sites.

-d

Diverts path and compensates for filename and pathname incompatibilities between systems. (It's more reliable to rename files before you send them, though.) All periods (.) in a filename are changed to path-subpath separators in the transmitted pathname. (In Unix, change to / characters, and in DOS, change to backslashes. A file named foobar.bazbuzzy, for example, is transmitted as foobar/bazbuzzy.) If a stem filename has more than eight characters, a period is inserted to allow up to 11 characters. For example, a Unix file named foo.barbazbuzzy would be transmitted as foo/barbazbuzzy, but when received by the DOS Zmodem program would be stored as foo\barbazbu.zzy. (If the file is longer than that, and the receiving program cannot handle the length, the file is truncated at the limit--depending on the "wisdom" of the DOS Zmodem program.)

-e

Escapes control characters.

-f

Preserves full path. Directory prefixes are usually omitted; this forces the entire path to be sent in the transmitted filename.

-L bytes

Sets the Zmodem subpacket length in bytes. (These are not the same as Xmodem, Ymodem, or Kermit packets.) The default packet length is 128 below 300 baud, 256 above 300 baud, or 1024 above 2400 baud. A larger packet gives slightly higher throughput, while a smaller packet speeds error recovery. This isn't worth messing with for modern modems that implement an error-correcting protocol in hardware.

-l num

Sets the packet length in bytes. The receiver acknowledges correct data every num characters, where num is a value between 32 and 1024. You can use this to avoid overrun when XOFF flow control is lacking between the systems.

-n

Newer file preservation. Send the file if the destination file of the same name does not exist, and overwrite the destination file only if the source file is newer than the destination file.

-N

Newer/longer file preservation. Send the file if the destination file of the same name does not exist, and overwrite the destination file only if the source file is newer or longer than the destination file.

-p

Protects destination files. Doesn't transfer the file if the destination file exists.

-q

Suppresses reporting to the standard error.

-r

Resumes an interrupted file transfer. If the source file is longer than the destination file, the transfer begins at the offset in the source file that equals the length of the destination file. (This mode is automatically assumed in some Zmodem receiving programs.)

-t num

Timeout. Set the timeout to num tenths of seconds.

-u

Breaks file links after successful transmission. Conveniently implements a way to "collect" files to a directory they can all be sent from.

-w bytes

Limits the transmit window size to the specified number of bytes to impose flow control and limit buffering.

-v

Turns on verbose. Appends the list of transmitted filenames to the /tmp/szlog record. Extra -v options cause additional information about the transfer to be added to the record.

-y

Tells the receiving Zmodem program to overwrite any existing files having the same name.

-Y

Tells the receiving Zmodem program to overwrite any existing file with the same name, but skip sending source files that have a file with the same pathname on the destination system.



Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.

This HTML Help has been published using the chm2web software.