Home Explore Blog CI



man-pages

19th chunk of `zip.man`
8776cb6fe4d19e4437d796a0b3604c18dfca78eb8add09870000000100000fda
 ‐‐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 command line of any other user; even on
              stand‐alone systems there is always the threat of over‐the‐shoul‐
              der peeking.  Storing the plaintext password as part of a command
              line in an automated script is even  worse.   Whenever  possible,
              use the non‐echoing, interactive prompt to enter passwords.  (And
              where  security is truly important, use strong encryption such as
              Pretty Good Privacy instead of the relatively weak  standard  en‐
              cryption provided by zipfile utilities.)

       -q
       --quiet
              Quiet mode; eliminate informational messages and comment prompts.
              (Useful, for example, in shell scripts and background tasks).

       -Qn
       --Q-flag n
              [QDOS] store information about the file in the file header with n
              defined as
              bit  0: Don’t add headers for any file
              bit  1: Add headers for all files
              bit  2: Don’t wait for interactive key press on exit

       -r
       --recurse-paths
              Travel the directory structure recursively; for example:

                     zip ‐r foo.zip foo

              or more concisely

                     zip ‐r foo foo

              In this case, all the files and directories in foo are saved in a
              zip  archive  named  foo.zip, including files with names starting
              with ".", since the recursion does not use the shell’s  file‐name
              substitution  mechanism.   If you wish to include only a specific
              subset of the files in directory foo and its subdirectories,  use
              the  -i  option  to  specify the pattern of files to be included.
              You should not use -r with the name ".*", since that matches ".."
              which will attempt to zip up the parent directory  (probably  not
              what was intended).

              Multiple source directories are allowed as in

                     zip ‐r foo foo1 foo2

              which  first  zips  up foo1 and then foo2, going down each direc‐
              tory.

              Note that while wildcards to ‐r are typically resolved while  re‐
              cursing  down  directories in the file system, any ‐R, ‐x, and ‐i
              wildcards are applied to internal archive pathnames once the  di‐
              rectories  are scanned.  To have wildcards apply to files in sub‐
              directories when recursing on Unix and similar systems where  the
              shell  does wildcard substitution, either escape all wildcards or
              put all arguments with wildcards in quotes.  This  lets  zip  see
              the  wildcards and match files in subdirectories using them as it
              recurses.

       -R
       --recurse-patterns
              Travel the directory structure recursively starting at  the  cur‐
              rent directory; for example:

              

Title: zip Options: -p, -P, -q, -Q, -r, -R
Summary
This section describes the zip command's options: '-p' includes relative file paths, '-P' uses a specified password for encryption (insecure), '-q' enables quiet mode, '-Qn' stores QDOS file information, '-r' recursively traverses directories, and '-R' recursively traverses directories starting from the current directory.