Copied to clipboard


zip is a command-line program that can be used to compress multiple files into a single ZIP file for storage and transportation.


  • Recursively compress a folder and its contents: zip -r folder
  • Compress only newer files in the target file: zip -u file
  • Display more information during compression: zip -v file
  • Do not compress directories during compression: zip -c file
  • Compress empty files during compression: zip -z file
  • Set the file name suffix for the compressed file, usually '.zip': zip -a file
  • Do not save path information during compression: zip -j file
  • No compression: zip -0 file
  • Fastest compression method: zip -1 file
  • Medium compression method: zip -2 file
  • Minimal compression rate, also the slowest compression method: zip -3 file
  • Display help information: zip --help
  • To compress multiple files, simply add the filenames to be compressed after the command. For example, to compress files 1.txt, 2.txt, and 3.txt into a ZIP file named "", use the following command: zip 1.txt 2.txt 3.txt