table of contents
other sections
| SZ(1) | General Commands Manual | SZ(1) |
NAME¶
sx, sb, sz - XMODEM, YMODEM, ZMODEM file sendSYNOPSIS¶
sz [-+8abdefkLlNnopqTtuvyY] file ...DESCRIPTION¶
Sz uses the ZMODEM, YMODEM or XMODEM error correcting protocol to send one or more files over a dial-in serial port to a variety of programs running under PC-DOS, CP/M, Unix, VMS, and other operating systems.- -+, --append
- Instruct the receiver to append transmitted data to an existing file (ZMODEM only).
- -2, --twostop
- use two stop bits (if possible). Do not use this unless you know what you are doing.
- -8, --try-8k
- Try to go up to 8KB blocksize. This is incompatible with standard zmodem, but a common extension in the bbs world. (ZMODEM only).
- --start-8k
- Start with 8KB blocksize. Like --try-8k.
- -a, --ascii
- 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, --binary
- (ZMODEM) Binary override: transfer file without any translation.
- -B NUMBER, --bufsize NUMBER
- Use a readbuffer of NUMBER bytes. Default ist 16384,
which should be enough for most situations. If you have a slow machine or
a bad disk interface or suffer from other hardware problems you might want
to increase the buffersize. -1 or auto use a buffer large
enough to buffer the whole file. Be careful with this option - things
normally get worse, not better, if the machine starts to swap.
Using this option turns of memory mapping of the input file. This increases memory and cpu usage.
- -c COMMAND, --command COMMAND
- Send COMMAND to the receiver for execution, return with COMMAND´s exit status.
- -C N, --command-tries N
- Retry to send command N times (default: 11).
- -d, --dot-to-slash
- 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.
This option enables the --full-path option.
- --delay-startup N
- Wait N seconds before doing anything.
- -e, --escape
- Escape all control characters; normally XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
- -E, --rename
- Force the sender to rename the new file if a file with the same name already exists.
- -f, --full-path
- Send Full pathname. Normally directory prefixes are
stripped from the transmitted filename.
This is also turned on with to --dot-to-slash option.
- -h, --help
- give help.
- -i COMMAND, --immediate-command COMMAND
- Send COMMAND to the receiver for execution, return immediately upon the receiving program's successful reception of the command.
- -k, --1k
- (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, --packetlen 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.
- -m N, --min-bps N
- Stop transmission if BPS-Rate (Bytes Per Second) falls below N for a certain time (see --min-bps-time option).
- -M N, --min-bps-time
- Used together with --min-bps. Default is 120 (seconds).
- -l N, --framelen N
- Wait for the receiver to acknowledge correct data every N (32 <= N <= 1024) characters. This may be used to avoid network overrun when XOFF flow control is lacking.
- -n, --newer
- (ZMODEM) Send each file if destination file does not exist. Overwrite destination file if source file is newer than the destination file.
- -N, --newer-or-longer
- (ZMODEM) Send each file if destination file does not exist. Overwrite destination file if source file is newer or longer than the destination file.
- -o, --16-bit-crc
- (ZMODEM) Disable automatic selection of 32 bit CRC.
- -O, --disable-timeouts
- Disable read timeout handling. This makes lsz hang if the
other side doesn't send anything, but increases performance (not much) and
decreases system load (reduces number of system calls by about 50
percent).
Use this option with care.
- -p, --protect
- (ZMODEM) Protect existing destination files by skipping transfer if the destination file exists.
- -q, --quiet
- Quiet suppresses verbosity.
- -R, --restricted
- Restricted mode: restricts pathnames to the current directory and PUBDIR (usually /usr/spool/uucppublic) and/or subdirectories thereof.
- -r, --resume
- (ZMODEM) 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.
- -s HH:MM, --stop-at HH:MM
- Stop transmission at HH hours, MM minutes. Another variant, using +N instead of HH:MM, stops transmission in N seconds.
- -S, --timesync
- enable timesync protocol support. See timesync.doc for
further information.
This option is incompatible with standard zmodem. Use it with care.
- --syslog[=off]
- turn syslogging on or off. the default is set at configure time. This option is ignored if no syslog support is compiled in.
- -t TIM, --timeout TIM
- Change timeout to TIM tenths of seconds.
- -T, --turbo
- Do not escape certain characters (^P, ^P|0x80, telenet escape sequence [CR + @]). This improves performance by about 1 percent and shouldn't hurt in the normal case (but be careful - ^P might be useful if connected through a terminal server).
- --tcp
- Try to initiate a TCP/IP connection. lsz will ask the
receiving zmodem to open a TCP/IP connection. All handshaking (which
address / port to use) will be done by the zmodem programs.
You will normally not want to use this option as lrzsz is the only zmodem which understands what to do (private extension). You might want to use this option if the two programs are connected (stdin/out) over a slow or bad (not 8bit clean) network connection.Use of this option imposes a security risk, somebody else could connect to the port in between. See SECURITY for details.
- --tcp-client ADDRESS:PORT
- Act as a tcp/ip client: Connect to the given port.
See --tcp-server for more information.
- --tcp-server
- Act as a server: Open a socket, print out what to do, wait
for connection.
You will normally not want to use this option as lrzsz is the only zmodem which understands what to do (private extension). You might want to use this if you have to use zmodem (for which reason whatever), and cannot use the --tcp option of lsz (perhaps because your telnet doesn't allow to spawn a local program with stdin/stdout connected to the remote side).If you use this option you have to start lsz with the --tcp-client ADDRESS:PORT option. lrz will print the address and port on startup.Use of this option imposes a security risk, somebody else could connect to the port in between. See SECURITY for details.
- -u
- Unlink the file after successful transmission.
- -U, --unrestrict
- Turn off restricted mode (this is not possible if running under a restricted shell).
- -w N, --windowsize N
- Limit the transmit window size to N bytes (ZMODEM).
- -v, --verbose
- Verbose output to stderr. More v's generate more output.
- -X, --xmodem
- use XMODEM protocol.
- -y, --overwrite
- Instruct a ZMODEM receiving program to overwrite any existing file with the same name.
- -Y, --overwrite-or-skip
- Instruct a ZMODEM receiving program to overwrite any existing file with the same name, and to skip any source files that do have a file with the same pathname on the destination system.
- --ymodem
- use ZMODEM protocol.
- -Z, --zmodem
- use ZMODEM protocol.
SECURITY¶
Restricted mode restricts pathnames to the current directory and PUBDIR (usually /var/spool/uucppublic) and/or subdirectories thereof, and disables remote command execution.- Use of the
- --tcp-client or --tcp-server options imposes
a security risk, as somebody else could connect to the port before you do
it, and grab your data. If there's strong demand for a more secure mode i
might introduce some sort of password challenge.
ENVIRONMENT¶
- ZNULLS
- may be used to specify the number of nulls to send before a ZDATA frame.
- SHELL
- lsz recognizes a restricted shell if this variable includes rsh or rksh
- ZMODEM_RESTRICTED
- lrz enters restricted mode if the variable is set.
- TMPDIR
- If this environment variable is set its content is used as the directory to place in the answer file to a timesync request. TMP Used instead of TMPDIR if TMPDIR is not set. If neither TMPDIR nor TMP is set /tmp will be used.
EXAMPLES¶
ZMODEM File Transfer (Unix to DSZ/ZCOMM/Professional-YAM)cpszall:all
sz -c "c:;cd /yam/dist"
sz -ya $(YD)/*.me
sz -yqb y*.exe
sz -c "cd /yam"
sz -i "!insms"
ERROR MESSAGES¶
"Caught signal 99" indicates the program was not properly compiled, refer to "bibi(99)" in rbsb.c for details.SEE ALSO¶
rz(omen), ZMODEM.DOC, YMODEM.DOC, Professional-YAM, crc(omen), sq(omen), todos(omen), tocpm(omen), tomac(omen), yam(omen)VMS VERSION¶
The VMS version does not support wild cards. Because of VMS DCL, upper case option letters must be represented by \ preceding the letter.FILES¶
32 bit CRC code courtesy Gary S. Brown.TESTING FEATURE¶
The command "sz -T file" exercises the Attn sequence error recovery by commanding errors with unterminated packets. The receiving program should complain five times about binary data packets being too long. Each time sz is interrupted, it should send a ZDATA header followed by another defective packet. If the receiver does not detect five long data packets, the Attn sequence is not interrupting the sender, and the Myattn string in sz.c must be modified.BUGS¶
Calling sz from most versions of cu(1) doesn't work because cu's receive process fights sz for characters from the modem.| 2.6.1996 | lrzsz-0.12b |