Home Explore Blog CI



man-pages

21th chunk of `zip.man`
dc7b4261bd77e6dd13d1a2961f938d6633327a363d8a341d0000000100000fcb
 split size a single‐file archive is
              created.

              Split archives are stored in numbered files.  For example, if the
              output archive is named archive and three  splits  are  required,
              the  resulting  archive  will  be in the three files archive.z01,
              archive.z02, and archive.zip.  Do not  change  the  numbering  of
              these files or the archive will not be readable as these are used
              to determine the order the splits are read.

              Split size is a number optionally followed by a multiplier.  Cur‐
              rently  the  number  must be an integer.  The multiplier can cur‐
              rently be one of k (kilobytes), m (megabytes), g (gigabytes),  or
              t (terabytes).  As 64k is the minimum split size, numbers without
              multipliers default to megabytes.  For example, to create a split
              archive  called  foo  with the contents of the bar directory with
              splits of 670 MB that might be useful for  burning  on  CDs,  the
              command:

                     zip ‐s 670m ‐r foo bar

              could be used.

              Currently the old splits of a split archive are not excluded from
              a  new archive, but they can be specifically excluded.  If possi‐
              ble, keep the input and output archives out  of  the  path  being
              zipped when creating split archives.

              Using -s without -sp as above creates all the splits where foo is
              being  written,  in  this case the current directory.  This split
              mode updates the splits as the archive is being created,  requir‐
              ing  all  splits  to  remain writable, but creates split archives
              that are readable by any unzip that supports split archives.  See
              -sp below for enabling split pause mode which allows splits to be
              written directly to removable media.

              The option -sv can be used to enable verbose splitting  and  pro‐
              vide  details of how the splitting is being done.  The -sb option
              can be used to ring the bell when zip pauses for the  next  split
              destination.

              Split  archives  cannot be updated, but see the -O (--out) option
              for how a split archive can be updated as it is copied to  a  new
              archive.   A  split  archive can also be converted into a single‐
              file archive using a split size of 0 or negating the -s option:

                     zip ‐s 0 split.zip ‐‐out single.zip

              Also see -U (--copy) for more on using copy mode.

       -sb
       --split-bell
              If splitting and using split pause mode, ring the bell  when  zip
              pauses for each split destination.

       -sc
       --show-command
              Show  the  command  line starting zip as processed and exit.  The
              new command parser permutes the arguments,  putting  all  options
              and  any  values associated with them before any non‐option argu‐
              ments.  This allows an option to appear anywhere in  the  command
              line  as  long  as any values that go with the option go with it.
              This option displays the command line as zip sees  it,  including
              any  arguments from the environment such as from the ZIPOPT vari‐
              able.  Where allowed, options later in the command line can over‐
              ride options earlier in the command line.

       -sf
       --show-files
              Show the files that would be operated on,  then  exit.   For  in‐
              stance,  if creating a new archive, this will list the files that
              would be added.  If the option is negated, -sf-, output  only  to
              an  open  log  file.  Screen display is not recommended for large
              lists.

       -so
       --show-options

Title: zip Options: -s continued, -sb, -sc, -sf, -so
Summary
This section details further usage of the '-s' option for creating split archives with a specified size. It explains how the splits are handled, named, and the units used for size specification. It also covers options like '-sb' for ringing a bell when zip pauses in split pause mode, '-sc' for showing the processed command line, and '-sf' for listing files that would be operated on without executing the command.