Home Explore Blog CI



man-pages

5th chunk of `zip.man`
94239b4e4f378b98b627c06b9bffadcdf4f2e7896f6df5a70000000100000fb1
 system (as well as from an existing archive)
       while the internal modes (delete and copy) operate  exclusively  on  en‐
       tries in an existing archive.

       add
              Update  existing  entries and add new files.  If the archive does
              not exist create it.  This is the default mode.

       update (-u)
              Update existing entries if newer on the file system and  add  new
              files.  If the archive does not exist issue warning then create a
              new archive.

       freshen (-f)
              Update  existing  entries of an archive if newer on the file sys‐
              tem.  Does not add new files to the archive.

       delete (-d)
              Select entries in an existing archive and delete them.

       copy (-U)
              Select entries in an existing archive and  copy  them  to  a  new
              archive.   This  new  mode  is similar to update but command line
              patterns select entries in the existing archive rather than files
              from the file system and it uses the --out option  to  write  the
              resulting  archive  to a new file rather than update the existing
              archive, leaving the original archive unchanged.

       The new File Sync option (-FS) is also considered a new mode, though  it
       is similar to update.  This mode synchronizes the archive with the files
       on  the OS, only replacing files in the archive if the file time or size
       of the OS file is different, adding new files, and deleting entries from
       the archive where there is no matching file.  As this  mode  can  delete
       entries from the archive, consider making a backup copy of the archive.

       Also see -DF for creating difference archives.

       See  each  option description below for details and the EXAMPLES section
       below for examples.

       Split archives.  zip version 3.0 and later can create split archives.  A
       split archive is a standard  zip  archive  split  over  multiple  files.
       (Note  that  split archives are not just archives split in to pieces, as
       the offsets of entries are now based on the start of each  split.   Con‐
       catenating  the pieces together will invalidate these offsets, but unzip
       can usually deal with it.  zip will usually refuse  to  process  such  a
       spliced archive unless the -FF fix option is used to fix the offsets.)

       One  use of split archives is storing a large archive on multiple remov‐
       able media.  For a split archive with 20 split files the files are typi‐
       cally named (replace ARCHIVE with the name of your archive) ARCHIVE.z01,
       ARCHIVE.z02, ..., ARCHIVE.z19, ARCHIVE.zip.  Note that the last file  is
       the  .zip  file.   In contrast, spanned archives are the original multi‐
       disk archive generally requiring floppy disks and using volume labels to
       store disk  numbers.   zip  supports  split  archives  but  not  spanned
       archives, though a procedure exists for converting split archives of the
       right  size  to  spanned archives.  The reverse is also true, where each
       file of a spanned archive can be copied in order to files with the above
       names to create a split archive.

       Use -s to set the split size and create a split archive.   The  size  is
       given  as a number followed optionally by one of k (kB), m (MB), g (GB),
       or t (TB) (the default is m).  The -sp option can be used to  pause  zip
       between  splits to allow changing removable media, for example, but read
       the descriptions and warnings for both -s and -sp below.

       Though zip does not update split archives, zip provides the  new  option
       -O  (--output-file  or  --out) to allow split archives to be updated and
       saved in a new archive.  For example,

              zip inarchive.zip foo.c bar.c --out outarchive.zip

       reads archive inarchive.zip, even if split,

Title: zip: Command Modes Continued, File Sync, Difference Archives, and Split Archives
Summary
This section continues the description of zip command modes, detailing the 'copy' mode. It introduces the 'File Sync' option (-FS) for synchronizing archives with the file system, including the potential deletion of entries, and mentions the creation of difference archives (-DF). The section then transitions to split archives, explaining how zip 3.0 and later can create them, distinguishing them from spanned archives. It covers the naming convention for split archive files and discusses the use of the -s and -sp options for creating and managing split archives. Finally, it introduces the -O (--output-file or --out) option for updating split archives.