Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
HP & Linux

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 62 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       sz [-+8abdefkLlNnopqTtuvyY] file ...
       sb [-adfkqtuv] file ...
       sx [-akqtuv] file
       sz [-oqtv] -c COMMAND
       sz [-oqtv] -i COMMAND
       sz -TT


       Sz uses the ZMODEM, YMODEM or XMODEM error correcting pro­
       tocol 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.

       While rz is smart enough to be called from cu(1), very few
       versions  of  cu(1)  are  smart enough to allow sz to work
       properly.  Unix flavors of Professional-YAM are  available
       for such dial-out application.

       Sz sends one or more files with ZMODEM protocol.

       ZMODEM  greatly simplifies file transfers compared to XMO­
       DEM.  In addition to a  friendly  user  interface,  ZMODEM
       provides  Personal  Computer and other users an efficient,
       accurate, and robust file transfer method.

       ZMODEM provides complete END-TO-END data integrity between
       application  programs.  ZMODEM's 32 bit CRC catches errors
       that sneak into even the most advanced networks.

       Advanced file  management  features  include  AutoDownload
       (Automatic  file Download initiated without user interven­
       tion), Display of individual and total  file  lengths  and
       transmission  time  estimates,  Crash  Recovery, selective
       file transfers, and preservation of exact  file  date  and

       Output  from another program may be piped to sz for trans­
       mission by denoting standard input with "-":
                              ls -l | sz -
       The  program  output  is  transmitted  with  the  filename
       sPID.sz where PID is the process ID of the sz program.  If
       the environment  variable  ONAME  is  set,  that  is  used
       instead.  In this case, the Unix command:
                       ls -l | ONAME=con sz -ay -
       will  send a "file" to the PC-DOS console display.  The -y
       option instructs the receiver to open the file for writing
       unconditionally.   The  -a  option  causes the receiver to
       convert Unix newlines to PC-DOS carriage returns and line­

       time and file mode are set accordingly.

       Sx sends a single file with XMODEM or  XMODEM-1k  protocol
       (sometimes  incorrectly  called  "ymodem").  The user must
       supply the file name to both sending  and  receiving  pro­

       If  sz  is  invoked  with $SHELL set and iff that variable
       contains the  string  rsh  ,  rbash  or  rksh  (restricted
       shell),  sz  operates in restricted mode.  Restricted mode
       restricts pathnames to the current  directory  and  PUBDIR
       (usually   /usr/spool/uucppublic)   and/or  subdirectories

       The fourth  form  sends  a  single  COMMAND  to  a  ZMODEM
       receiver  for execution.  Sz exits with the COMMAND return
       value.  If COMMAND includes spaces or  characters  special
       to the shell, it must be quoted.

       The fifth form sends a single COMMAND to a ZMODEM receiver
       for execution.  Sz exits as soon as the receiver has  cor­
       rectly received the command, before it is executed.

       The  sixth  form  (sz -TT) attempts to output all 256 code
       combinations to the terminal.  In you  are  having  diffi­
       culty sending files, this command lets you see which char­
       acter codes are being eaten by the operating system.

       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:

       -+, --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 with 8KB blocksize. Like --try-8k.
              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 transmit­
              ted pathname.  Thus, C.omenB0000  (which  is  unac­
              ceptable  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.
       Force the sender to rename the new file if a file with the
              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
       -h, --help
              give help.
       -i COMMAND, --immediate-command COMMAND
              Send  COMMAND to the receiver for execution, return
              immediately upon the receiving program's successful
              recption 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
       -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
              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 sys­
              tem 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/uucppub­
              lic) 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
       -s HH:MM, --stop-at HH:MM
              Stop transmission at HH hours, MM minutes.  Another
              variant, using +N instead of HH:MM, stops transmis­
              sion 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.
              turn syslogging on or off. the default  is  set  at
              configure  time.  This option is ignored if no sys­
              log 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).
              SECURITY for details.
       --tcp-client ADDRESS:PORT
              Act as a tcp/ip client: Connect to the given  port.

              See --tcp-server for more information.

              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 what­
              ever), and cannot use the --tcp option of lsz (per­
              haps  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, some­
              body 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
       -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.
              use ZMODEM protocol.
       -Z, --zmodem
              use ZMODEM protocol.


              --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.


       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

              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.


       ZMODEM File Transfer (Unix to DSZ/ZCOMM/Professional-YAM)
       % sz -a *.c
       This  single command transfers all .c files in the current
       Unix directory with conversion (-a) to end of line conven­
       tions appropriate to the receiving environment.  With ZMO­
       DEM AutoDownload enabled, Professional-YAM  and ZCOMM will
       automatically  recieve  the files after performing a secu­
       rity check.

       % sz -Yan *.c *.h
       Send only the .c and .h files that exist on both  systems,
       and are newer on the sending system than the corresponding
       version on the receiving system, converting  Unix  to  DOS
       text format.
       $ sz -\Yan file1.c file2.c file3.c foo.h baz.h ®(for VMS)

       ZMODEM Command Download (Unix to Professional-YAM)
           sz -c "c:;cd /yam/dist"
           sz -ya $(YD)/*.me
           sz -yqb y*.exe
           sz -c "cd /yam"
           sz -i "!insms"
       This  Makefile  fragment uses sz to issue commands to Pro­
       fessional-YAM to change current disk and directory.  Next,
       sz  transfers  the  .me files from the $YD directory, com­
       manding the receiver to overwrite the  old  files  and  to
       reliable than ZMODEM.


       "Caught  signal 99" indicates the program was not properly
       compiled, refer to "bibi(99)" in rbsb.c for details.


       rz(omen),   ZMODEM.DOC,   YMODEM.DOC,    Professional-YAM,
       crc(omen),     sq(omen),     todos(omen),     tocpm(omen),
       tomac(omen), yam(omen)

       Compile time options required for various  operating  sys­
       tems are described in the source file.


       The  VMS  version does not support wild cards.  Because of
       VMS DCL, upper case option letters muse be represented  by
       \ proceding the letter.

       The  current  VMS  version  does  not support XMODEM, XMO­
       DEM-1k, or YMODEM.

       VMS C Standard I/O and RMS may interact to modify the file


       32 bit CRC code courtesy Gary S. Brown.

       sz.c, crctab.c, rbsb.c, zm.c, zmodem.h Unix source files

       sz.c,  crctab.c,  vrzsz.c, zm.c, zmodem.h, vmodem.h, vvmo­
       dem.c, VMS source files.

       /tmp/szlog stores debugging  output  (sz  -vv)  (szlog  on


       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 inter­
       rupting the sender, and the Myattn string in sz.c must  be

       After  5  packets,  sz stops the "transfer" and prints the
       total number of characters "sent" (Tcount).   The  differ­
       ence  between  Tcount  and  5120  represents the number of
       characters  stored  in  various  buffers  when  the   Attn
       sequence is generated.
       Pro-YAM, or other program with a correct implementation of
       the specified protocol.

       Many programs claiming to support YMODEM only support XMO­
       DEM with 1k blocks, and they often don't  get  that  quite

       XMODEM  transfers  add  up  to 127 garbage bytes per file.
       XMODEM-1k and YMODEM-1k transfers use 128 byte  blocks  to
       avoid extra padding.

       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;  per­
       haps  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.

       A  few  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.

lrzsz-0.12b                  2.6.1996                       SZ(1)

An undefined database error occurred. SELECT distinct pages.pagepath,pages.pageid FROM pages, page2command WHERE pages.pageid = page2command.pageid AND commandid =




Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.10 Seconds