[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