Questions tagged [zip]

Compression and archive format that stores one or more files into a single file, usually with a .zip file extension.

ZIP is a compression and archive format that stores one or more files into a single file, usually with a .zip file extension.

It originally supported a simple symmetric password encryption system: file contents are encrypted, but file names are not. It is known to be seriously flawed, and should not be relied for private and important information. Updates to the ZIP specification has introduced AES, RC2/4 and DES encryption methods.

Each file is compressed separately, which gives the advantage or being able to extract arbitrary files without needing to decompress the entire archive.

Popular questions


1147 questions
12 answers

View list of files in ZIP archive on Linux

How can I view the list of files in a ZIP archive without decompressing it?
  • 7,233
  • 3
  • 18
  • 16
3 answers

Linux unzip command: Option to force overwrite?

I am writing a shell script that unzips a ZIP file into an existing hierarchy of files, potentially overwriting some of the files. The problem is that the unzip command asks for confirmation: replace jsp/extension/add-aspect.jsp? [y]es, [n]o, [A]ll,…
Nicolas Raoul
  • 10,711
  • 18
  • 64
  • 102
8 answers

Read the contents of a zipped file without extraction?

How can I read the contents of a particular file in an archive without extracting the .zip it is contained within? I'm using the Linux command line. An earlier question asks about viewing the directory of the archive. But for me it is not enough to…
  • 2,441
  • 2
  • 14
  • 3
9 answers

Unix zip directory but excluded specific subdirectories (and everything within them)

I'm trying to zip a directory (on Unix via SSH) but I need to exclude a couple of subdirectories (and all files and directories within them). So far I have this: zip -r dir1 -x dir1/ignoreDir/**/* That doesn't seem to work though. I…
  • 4,811
  • 3
  • 17
  • 10
4 answers

What is __MACOSX folder?

What are these __MACOSX folders I keep seeing in zip files made by people on OSX? Some take as much as 30% of the file. What program are producing these __MACOSX folder and how can mac users avoid this mistake?
  • 2,391
  • 3
  • 16
  • 10
5 answers

Compress files from OS X terminal?

In the Finder, there is this wonderful ability to right click on a file or directory, select compress from the drop-down, and end up with a zipped file. Is it possible to do the same thing from the terminal?
William Jockusch
  • 4,573
  • 10
  • 34
  • 44
14 answers

Can you zip a file from the command prompt using ONLY Windows' built-in capability to zip files?

I have a batch file that outputs a text file. I thought it would be nice if I could zip it up too. This will be used in an uncontrolled environment, so I can't make assumptions about the presence of third-party software products such as 7-Zip, etc.…
Aaron Bush
  • 1,483
  • 2
  • 11
  • 7
9 answers

Why is Zip able to compress single file smaller than multiple files with the same content?

Suppose that I have 10,000 XML files. Now suppose that I want to send them to a friend. Before sending them, I would like to compress them. Method 1: Don't compress them Results: Resulting Size: 62 MB Percent of initial size: 100% Method 2: Zip…
  • 8,049
  • 16
  • 52
  • 71
4 answers

Zipping folders and their contents into a .zip file in Linux

How do I make a .zip file that contains every file AND every folder in the directory?
6 answers

What are the best options to use when compressing files using 7 Zip?

I often have to gather log files and upload them to a central server (Owned by another company). The central server has a size limit of the file, so I am trying to create the smallest file possible that is still in the zip format. What are the best…
  • 1,827
  • 2
  • 15
  • 19
2 answers

How to list the contents of a zip along w/ file sizes and compression ratio via cmd line

How do I list the contents of a zip along w/ file sizes and compression ratio (or packed size) on osx w/ command line tools?
  • 3,977
  • 18
  • 51
  • 63
1 answer

Remove single file from zip archive on Linux

I have a zip archive (created automatically in a script with -j -r flags) and I would like to remove a single file from it. I tried as documented. zip -d "picture_43_9.jpg" but I get this error: zip warning: picture_43_9.jpg not found…
Alex Flo
  • 1,301
  • 3
  • 10
  • 12
5 answers

Create a tar file for compressing files and directories on Mac OS X

I'm new to Mac OS X and am not sure how to do this: I have three directories. I want to create a tar/zip file of them so that I can attach them to an email. Any ideas?
  • 4,925
  • 25
  • 72
  • 92
9 answers

On Linux/Unix, does .tar.gz versus .zip matter?

Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different. If, however, the contents are going to be the same, it would be simpler…
  • 2,527
  • 4
  • 28
  • 31
21 answers

Compressing with RAR vs ZIP

A lot of people are compressing files with RAR, sending compressed files with RAR and so on. ZIP is more standard and works on all platforms. Windows users have ZIP included and Linux users have no trouble with that file format. The tests I did…
  • 1,067
  • 1
  • 15
  • 24
2 3
76 77