Skip to main content

Questions tagged [zip]

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

Filter by
Sorted by
Tagged with
703 votes
12 answers
791k views

View list of files in ZIP archive on Linux

How can I view the list of files in a ZIP archive without decompressing it?
johnlemon's user avatar
  • 7,583
338 votes
3 answers
479k views

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 ...
Nicolas Raoul's user avatar
258 votes
8 answers
398k views

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 ...
Shrikanth's user avatar
  • 2,581
254 votes
8 answers
331k views

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 myarchive.zip dir1 -x dir1/...
sulman's user avatar
  • 5,281
226 votes
4 answers
211k views

What is “__MACOSX” folder I keep seeing in Zip files made by people on OS X?

What are these __MACOSX folders I keep seeing in Zip files made by people on OS X? Some take as much as 30% of the file. What program are producing these __MACOSX folder and how can mac users avoid ...
Yada's user avatar
  • 2,501
192 votes
5 answers
316k views

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 ...
William Jockusch's user avatar
141 votes
13 answers
485k views

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 ...
Aaron Bush's user avatar
  • 1,553
133 votes
9 answers
17k views

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: ...
sixtyfootersdude's user avatar
130 votes
4 answers
408k views

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?
user avatar
120 votes
6 answers
382k views

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 ...
jjnguy's user avatar
  • 1,857
118 votes
2 answers
137k views

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?
erikvold's user avatar
  • 4,087
117 votes
1 answer
132k views

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" gallery.zip but I get ...
Alex Flo's user avatar
  • 1,361
113 votes
9 answers
127k views

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 ...
rwallace's user avatar
  • 2,629
110 votes
5 answers
304k views

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?
sagarkothari's user avatar
  • 5,015
91 votes
21 answers
159k views

Compressing with RAR vs ZIP [closed]

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 ...
91 votes
4 answers
60k views

Equivalent to tar's "--strip-components=1" in unzip?

I have a script that extracts a tar.gz-file to a specified subdirectory mysubfolder: mkdir mysubfolder; tar --extract --file=sourcefile.tar.gz --strip-components=1 --directory=mysubfolder; Is there ...
Fredrik's user avatar
  • 1,035
89 votes
7 answers
158k views

terminal tool (linux) for repair corrupted zip files

I've a corrupt zip file. I've tried to repair it with zip -F file.zip and zip -FF file.zip but was not successful. Is there another terminal tool under Linux for repairing?
cupakob's user avatar
  • 1,143
87 votes
11 answers
11k views

Can zipping a file break it?

I just asked someone to send me a zipped psd file. They declined, citing that zipping a file can break the fonts. I assumed zipping a file is perfectly reversible, hence why it is commonly used. I ...
alex's user avatar
  • 4,362
86 votes
7 answers
499k views

How to unzip a file using the cmd?

I want to make a BAT file that will ZIP or UNZIP a file. For zipping a file, I have found this question: Can you zip a file from the command prompt using ONLY Windows' built-in capability to zip ...
Chen Tasker's user avatar
82 votes
7 answers
137k views

Which is more efficient - tar or zip compression? What is the difference between tar and zip?

I'm working in Linux environment and want to know about tar and zip commands. Which is more efficient - tar or zip? I also need to know the differences between the tar and zip commands. Can anyone ...
rekha_sri's user avatar
  • 931
77 votes
10 answers
82k views

Compressing folders on a mac, without the .DS_Store

Is there anyway to get rid of the .DS_Store when compressing a folder on a mac? I work on a mac and send work to clients in zip format, but always get questioned on the .DS_Store folder inside them. ...
danixd's user avatar
  • 1,504
72 votes
6 answers
81k views

Avoid unwanted path in Zip file

I'm making a shell script to package some files. I'm zipping a directory like this: zip -r /Users/me/development/something/out.zip /Users/me/development/something/folder/ The problem is that the ...
jerwood's user avatar
  • 1,507
71 votes
7 answers
150k views

Trying to unzip a file, 'Filename not matched' when the directory exists

While trying to unzip a file named Joomla_3.0.3-Stable-Full_Package.zip to the directory named joomla I get filename not matched. Why is that? # unzip -Z Joomla_3.0.3-Stable-Full_Package.zip /opt/...
Suhail Gupta's user avatar
  • 2,243
71 votes
3 answers
4k views

Windows File is ludicrously huge and I cannot unzip it

I use an online file backup service (Backblaze) and recently got a new computer. Several files on my old computer were too large to move via my usb drive so I decided to download them from my backup ...
meed96's user avatar
  • 2,191
70 votes
8 answers
103k views

Is there a way to edit files inside of a zip file without explicitly extracting them first?

I sometimes need to make changes to a .zip or .jar file, so I usually move the file to /tmp, extract all the files with unzip, edit a few files, and then re-zip up the files. This works, but it can ...
austin's user avatar
  • 968
69 votes
12 answers
168k views

How to unzip split files on OS X

How do I unzip a split zip file? In Terminal, I wrote: unzip filename.zip and it did not unzip this file. Terminal wrote: $ unzip filename.zip Archive: filename.zip warning [filename.zip]: ...
Kris's user avatar
  • 691
67 votes
5 answers
134k views

What UnRar utilities are available for Mac OS X?

I have been using UnRarX ( http://www.unrarx.com/ ) and it's free and works well, but often times I will download a rar file in the browser and click on it in the recent downloads lists which will ...
cwd's user avatar
  • 18.2k
67 votes
2 answers
49k views

How to overwrite existing zip file instead of updating it in Info-Zip?

To obtain a fresh zip file just like as tar does, do I have to perform rm foo.zip before executing zip? $ mkdir foo; touch foo/bar $ zip -r foo.zip foo adding: foo/ (stored 0%) adding: foo/bar (...
asari's user avatar
  • 825
60 votes
9 answers
109k views

How to create a zip file compatible with Windows under Linux

I need to make a zip file available to all my Windows users visitors, so I naively produced a zip file with the Unix zip command (let's call it madeinlinux.zip). It opens successfully with WinRar or ...
user avatar
55 votes
8 answers
90k views

Zip files without compression

I'd like to bundle a number of big files into a single file, to make them easier to share. The files are already compressed (eg. jpeg, video etc), so I don't need compression, only archiving. How can ...
Colonel Panic's user avatar
55 votes
11 answers
287k views

How do I reassemble a zip file that has been emailed in multiple parts?

I received 3 emails each containing part of a zip file. The extensions end in .z00, .z01 and .z02. (Emailed as such to get around the typical 10Mb attachment limit per email.) I have put all 3 files ...
Guy's user avatar
  • 4,137
54 votes
1 answer
71k views

How to extract 7z zip and have correct directory strucuture?

XXXhostXXX:temp XXXuserXXX$ ls -a dir1/ . .. a.txt b.txt XXXhostXXX:temp XXXuserXXX$ pwd /Users/XXXuserXXX/temp XXXhostXXX:temp XXXuserXXX$ 7z a -t7z dir1 dir1 7-Zip [64] 9.20 Copyright (c) ...
qazwsx's user avatar
  • 9,039
54 votes
7 answers
160k views

How to restore Windows default Zip file functionality?

I recently lost the default file association for Zip files in Windows Vista (I think it happened when I uninstalled WinAce, but I can't be completely sure). How can I restore this association back to ...
Brian's user avatar
  • 800
53 votes
3 answers
39k views

How secure are password-protected zip files?

In modern zip utilities like 7zip, you can specify a password when creating a .ZIP file. But, how secure is this? What encryption algorithm(s) are used to secure password-protected zip files?
Justin Ethier's user avatar
51 votes
5 answers
4k views

How to "unextract" a zip file?

I extracted a zip file into a non-empty folder. The zip file has lots of files and a deep hierarchy, that merged with the existing tree of the target directory. How can I remove the files and ...
mafp's user avatar
  • 513
51 votes
4 answers
93k views

add password to existing zip file with 7zip

Is it possible to add a password to an existing zipfile with 7zip without going to all the trouble of unpacking it and re-packing it again?
matt wilkie's user avatar
  • 5,143
50 votes
7 answers
119k views

7-Zip doesn't ask me for a password for a ZIP file I encrypted while double-clicking it

I just tried to encrypt a folder with 7-Zip by a command line, choosing a password, but when double-clicking on the ZIP file, it shows me the files list without asking any password. Is there a way to ...
user avatar
50 votes
7 answers
182k views

How to make 7-Zip faster

I normally use WinRAR over 7-Zip simply because it's faster and only a little less efficient with compression. I did a few tests on different file types and sizes comparing the 7-Zip and WinRAR ...
Kefka's user avatar
  • 1,446
49 votes
5 answers
169k views

How do I create separate zip files for each selected file/directory in 7zip?

This is the internal zip packer from Total Commander: However I want to use my 7zip packer. When I select 5 files, I get 5 separate .zip archives for each selected file. How do I do that in 7zip?
Grumpy ol' Bear's user avatar
47 votes
5 answers
35k views

Can you configure Windows to open JAR files like ZIP files without a 3rd party tool?

I'd like to be able to examine the contents of a JAR file without having to install Winzip or some other tool and without having to rename the file. Windows Explorer can open ZIP files just fine; is ...
jodonnell's user avatar
  • 605
44 votes
5 answers
83k views

tar – extract discarding directory structure

unzip has a nifty option -j, whereby the directory structure of the archive is discarded, and all files are extracted into the same directory. Is there a way of making tar work in the same way? ...
Benji XVI's user avatar
  • 543
43 votes
15 answers
71k views

How to decompress a ZIP file with specified file/directory name character encoding?

I got ZIP file(s), which contains files, which filenames are in some encoding. Let's say I know encoding of those filenames, but I still dont know how to properly decompress them. Here is example ...
2ge's user avatar
  • 531
39 votes
2 answers
56k views

How to zip a list of files in Linux

I have many files I need to zip into a single directory. I don't want to zip all the files in the directory, but only ones matching a certain query. I did grep abc file-* > out.txt to make a ...
john mangual's user avatar
39 votes
12 answers
273k views

Mac OS: Unable to expand zip file

Mac OS. I am unable to expand zip file. I have tried this: Unzip in Terminal: Open Terminal. Type unzip and a space, then drag/drop the zip file into the Terminal window. Press Enter and the zip ...
juleshoward's user avatar
38 votes
1 answer
12k views

Why is unzipped directory much smaller (4.0 K) than zipped (73.0 G)?

I unzipped a zipped file using zip -l <filename> but what get is a dir much smaller than what it was before unzipping. Unzipped dir has all the files mostly videos. Why is the unzipped ...
bluedroid's user avatar
  • 457
38 votes
5 answers
21k views

Why is a 7zipped file larger than the raw file? [duplicate]

Possible Duplicate: Why doesn't ZIP Compression compress anything? I tried 7zipping an .exe file but it actually became larger. Is this the expected result?
IMB's user avatar
  • 5,533
34 votes
5 answers
65k views

Can Double Zipping Cause Problems?

I have a directory that I have been storing a ton of files in. Among the 10ish types of files there are also .zips of other directories. In my personal experience I vaguely remember issues when ...
sealz's user avatar
  • 2,324
34 votes
6 answers
85k views

How can I achieve the best, standard ZIP compression?

I don't care how long it takes to compress, all I want to achieve is two things: The absolute best possible compression ratio Compatibility with standard readers, such as Windows and WinZip So ...
31 votes
9 answers
19k views

How to uncompress a 9GB file in Windows FAT32

I have a 2GB RAR file that contains a 9GB video file. I'm using a FAT32 file system. Now I want to unzip that file but after 4GB I get an error due to the FAT32 file size limit. Now I want to know ...
Kashif's user avatar
  • 527
30 votes
2 answers
4k views

Compressing many similar large images?

I'm dealing with a large archive of satellite images of the Earth, each one taken 15 minutes apart over the same area, therefore they are quite similar to each other. Two contiguous ones look like ...
Camilo Rada's user avatar

1
2 3 4 5
24