Home Explore Blog CI



man-pages

18th chunk of `zip.man`
7edfa0333a87e3a735084e0c7a21331fd9eac57e25fcb7cb0000000100000fe3
 their own spe‐
              cialized compression methods).  By default, zip does not compress
              files with extensions in  the  list  .Z:.zip:.zoo:.arc:.lzh:.arj.
              Such  files are stored directly in the output archive.  The envi‐
              ronment variable ZIPOPT can be used to  change  the  default  op‐
              tions. For example under Unix with csh:

                     setenv ZIPOPT "‐n .gif:.zip"

              To attempt compression on all files, use:

                     zip ‐n : foo

              The  maximum  compression  option -9 also attempts compression on
              all files regardless of extension.

              On Acorn RISC OS systems the suffixes are actually  filetypes  (3
              hex  digit  format). By default, zip does not compress files with
              filetypes in the list DDC:D96:68E (i.e. Archives, CFS  files  and
              PackDir files).

       -nw
       --no‐wild
              Do  not perform internal wildcard processing (shell processing of
              wildcards is still done by the shell unless the arguments are es‐
              caped).  Useful if a list of paths is being read and no  wildcard
              substitution is desired.

       -N
       --notes
              [Amiga, MacOS] Save Amiga or MacOS filenotes as zipfile comments.
              They  can  be  restored by using the ‐N option of unzip. If ‐c is
              used also, you are prompted for comments  only  for  those  files
              that do not have filenotes.

       -o
       --latest‐time
              Set  the  "last  modified"  time of the zip archive to the latest
              (oldest) "last modified" time found among the entries in the  zip
              archive.   This  can be used without any other operations, if de‐
              sired.  For example:

              zip ‐o foo

              will change the last modified time of foo.zip to the latest  time
              of the entries in foo.zip.

       -O output‐file
       --output‐file output‐file
              Process the archive changes as usual, but instead of updating the
              existing  archive, output the new archive to output‐file.  Useful
              for updating an archive without changing the existing archive and
              the input archive must  be  a  different  file  than  the  output
              archive.

              This option can be used to create updated split archives.  It can
              also  be used with -U to copy entries from an existing archive to
              a new archive.  See the EXAMPLES section below.

              Another use is converting zip files from one split  size  to  an‐
              other.  For instance, to convert an archive with 700 MB CD splits
              to one with 2 GB DVD splits, can use:

                     zip ‐s 2g cd‐split.zip ‐‐out dvd‐split.zip

              which uses copy mode.  See -U below.  Also:

                     zip ‐s 0 split.zip ‐‐out unsplit.zip

              will convert a split archive to a single‐file archive.

              Copy mode will convert stream entries (using data descriptors and
              which  should  be  compatible with most unzips) to normal entries
              (which should be compatible with all unzips), except if  standard
              encryption  was  used.  For archives with encrypted entries, zip‐
              cloak will decrypt the entries and convert  them  to  normal  en‐
              tries.

       -p
       --paths
              Include  relative file paths as part of the names of files stored
              in the archive.  This is the default.  The -j  option  junks  the
              paths and just stores the names of the files.

       -P password
       --password password
              Use  password to encrypt zipfile entries (if any).  THIS IS INSE‐
              CURE!  Many multi‐user operating systems  provide  ways  for  any
              user  to  see the current

Title: zip Options: -nw, -N, -o, -O, -p, -P
Summary
This section details zip options: '-nw' disables internal wildcard processing, '-N' saves/restores Amiga/MacOS filenotes as comments, '-o' updates archive's last modified time, '-O' outputs the new archive to a specified file, '-p' includes relative file paths (default), and '-P' uses a password for encryption (insecure).