Home Explore Blog CI



man-pages

10th chunk of `zip.man`
145b9222a0726f58a9964e795567ec873796b698e6eaadd00000000100000fd4
           [MacOS] Include only data‐fork of files zipped into the  archive.
              Good for exporting files to foreign operating‐systems.  Resource‐
              forks will be ignored at all.

       -dg
       --display‐globaldots
              Display  progress  dots for the archive instead of for each file.
              The command

                         zip ‐qdgds 10m

              will turn off most output except dots every 10 MB.

       -ds size
       --dot‐size size
              Set amount of input file processed for each dot  displayed.   See
              ‐dd  to enable displaying dots.  Setting this option implies ‐dd.
              Size is in the format nm where n is a number and m  is  a  multi‐
              plier.   Currently m can be k (KB), m (MB), g (GB), or t (TB), so
              if n is 100 and m is k, size would be 100k which is 100 KB.   The
              default is 10 MB.

              The  ‐v option also displays dots and now defaults to 10 MB also.
              This rate is also controlled by this option.  A size of  0  turns
              dots off.

              This  option  does not control the dots from the "Scanning files"
              message as zip scans for input files.  The dot size for  that  is
              fixed  at  2  seconds  or a fixed number of entries, whichever is
              longer.

       -du
       --display‐usize
              Display the uncompressed size of each entry.

       -dv
       --display‐volume
              Display the volume (disk) number each entry is being  read  from,
              if reading an existing archive, and being written to.

       -D
       --no‐dir‐entries
              Do not create entries in the zip archive for directories.  Direc‐
              tory  entries are created by default so that their attributes can
              be saved in the zip archive.  The environment variable ZIPOPT can
              be used to change the default options.  For  example  under  Unix
              with sh:

                     ZIPOPT="‐D"; export ZIPOPT

              (The variable ZIPOPT can be used for any option, including -i and
              -x using a new option format detailed below, and can include sev‐
              eral  options.)  The option -D is a shorthand for -x "*/" but the
              latter previously could not be set as default in the ZIPOPT envi‐
              ronment variable as the contents of ZIPOPT gets inserted near the
              beginning of the command line and the file list had to end at the
              end of the line.

              This version of zip does allow -x and -i options in ZIPOPT if the
              form

               -x file file ... @

              is used, where the @ (an argument that is just @) terminates  the
              list.

       -DF
       --difference‐archive
              Create  an  archive that contains all new and changed files since
              the original archive was created.  For this to  work,  the  input
              file  list  and  current directory must be the same as during the
              original zip operation.

              For example, if the existing archive was created using

                     zip ‐r foofull .

              from the bar directory, then the command

                     zip ‐r foofull . ‐DF ‐‐out foonew

              also from the bar directory creates the archive foonew with  just
              the  files  not  in  foofull and the files where the size or file
              time of the files do not match those in foofull.

              Note that the timezone environment variable TZ should be set  ac‐
              cording  to  the  local timezone in order for this option to work
              correctly.  A change in timezone since the original  archive  was
              created could result in no times matching and all files being in‐
              cluded.

              A  possible approach to backing up a directory might

Title: zip: Detailed Explanation of Options (cont.)
Summary
This section describes further options for the zip command. It explains the '-du' or '--display-usize' option for showing the uncompressed size of entries, and '-dv' or '--display-volume' for showing the volume number. The '-D' or '--no-dir-entries' option prevents directory entries from being created, and demonstrates using the ZIPOPT environment variable to set default options. The '-DF' or '--difference-archive' option creates an archive containing only new and changed files since the original archive, highlighting the importance of matching the original conditions and timezone.