Zip is a file format used for data compression and archiving.

learn more… | top users | synonyms (1)

2
votes
2answers
325 views

Junk a part of the directory with unzip?

A zipfile f.zip contains a bunch of files all with directories. A/B A/B/C A/B/C/D .. A/B/C/D/and/some/more/dirs A/B2 Now I'm only interested in the tree below C/D. I can do unzip f.zip */D/* ...
0
votes
3answers
494 views

High CPU utilization with zip command

When I am using the zip utility in Linux to compress files, CPU utilization is going to 100%. Can anybody help me why CPU utilization is so high? I'm using the command: zip file_name *.xml
3
votes
4answers
1k views

Change working directory

I'm trying to compress a directory at /home/cyrus/sql And I wanted to change the working directory when zipping the folder: / $ zip -b /home/cyrus sql.zip /home/cyrus/sql But when I check the ...
6
votes
2answers
1k views

Add a file to a different path in a zip file

I have a file that placed in the following directory: folder_A/another_folder_A/file_to_add.xml Now, what I want to do is simply add the file to a folder in an existing zip archive. For example ...
0
votes
3answers
2k views

How to get extract/compress option on right clicking?

I am using Linux Mint 14 Nadia . Earlier whenever I right clicked any folder I got options like Extract it, Compress etc. But now I am not getting them . Probably I changed/deleted some of the ...
2
votes
1answer
3k views

Unzip file contents, but without creating archive folder

I have a file myarchive.zip that contains many directories, files, etc. Let's say this myarchive.zip file lives in a directory called "b". Well, when I use the "unzip myarchive.zip" command, the ...
2
votes
2answers
212 views

What scripting language can I use to automate a concatenation & zipping process?

For a project I'm doing I need to concatenate and compress (with zip) many (midi) files and compare their sizes. I've thought there must be some language that allows me to do something like this: ...
4
votes
4answers
617 views

unzip file, which directory was created?

Objective: After expanding archive a.zip by using command unzip on Ubuntu 12.10, assign the name of the folder a.zip expanded to to bash variable v. a.zip is assumed and guaranteed to expand to a ...
3
votes
1answer
764 views

Encoding of a zip file

When I extract some file (mp3) with japanese or korean characters within its filename on Windows, they appear normally, but when I extract it on Linux (Ubuntu/Mint) they appear as something like this ...
7
votes
1answer
9k views

command to zip multiple directories into individual zip files

I have a single directory that contains dozens of directories inside of it. I'm new to command line and I'm struggling to come up with a command that will zip each sub-directory into a unique ...
1
vote
1answer
1k views

How can I zip the contents of current directory minus all hidden files?

How can I zip up the contents (excluding hidden files and folders) of the folder I am currently in? zip -r extension.xpi . -x "*/.*" This is what I have so far, but I am still getting hidden files. ...
3
votes
4answers
425 views

Create directory if zip archive contains several files

If an archive contains several files in the root directory, I'd like to create a directory named after the file name (without extension). If an archive contains just a directory, then I'd like to ...
6
votes
2answers
818 views

How can I create a zip file v2.0?

How can I create a zip file v2.0? It seems OpenDocument files are zip files v2.0: $ file foo.odt foo.odt: OpenDocument Text $ hexdump -C -n 16 foo.odt 00000000 50 4b 03 04 14 00 00 08 00 00 03 0d ...
4
votes
3answers
337 views

How to tell if a file is being downloaded by wget?

I use wget to download files (most are zip files) automatically for me during the night. However, sometimes in the morning I find that a few files cannot be unzipped. I don't know why this is ...
6
votes
2answers
2k views

Add file to deep inside a zip file

Say I want to add the file file.txt to foo.zip, I could just do zip -u foo.zip file.txt. However inside the zip-file there already exist a folder with the path foo.zip/very/many/paths/ (relatively to ...
6
votes
2answers
6k views

How to extract only a specific folder from a zipped archive to a given directory?

How does one extract a specific folder from a zipped archive to a given directory? I tried using unzip "/path/to/archive.zip" "in/archive/folder/" -d "/path/to/unzip/to" but that only creates the ...
6
votes
1answer
553 views

Unzipping certain archives works on Windows but not on Linux

I've asked a few people and just thought about asking it here. We get sent files from an international company for design work in a zip format. Well when I run a script to unzip the files in the ...
2
votes
3answers
208 views

Zip output formatting

I'm learning zip and I have run into something I cannot figure out in man zip. When I run zip -r $folder $folder it will correctly zip all contents but the zip contents is as follows: zip |-folder ...
1
vote
1answer
2k views

How to unzip a directory inside a zip file

I want to unzip a certail directory inside a zip file using the following command: unzip -oq vqmodmanager.zip upload -d temp/ But the system gives the following error: caution: filename not ...
6
votes
2answers
30k views

Zip all files in directory?

Is there a way to zip all files in a given directory with the zip command? I've heard of using *.*, but I want it to work for extensionless files, too.
1
vote
3answers
412 views

Is it possible to run shell commands inside zip files?

Is it possible to run a shell script inside a zip folder in Linux? I have a shell script that is saved inside a zip folder, and I'd like to run the shell script inside the zip file (as if the zip file ...
2
votes
2answers
134 views

Zipping files two by two

I have a directory that has 800 files like this: file1.png file1@2x.png file2.png file2@2x.png file3.png file3@2x.png ... etc I need to create zip files like this file1.zip (containing ...
2
votes
2answers
674 views

How do I find corrupted archive files?

I have a lot of zip files. Some are not downloaded correctly and are corrupted. I want to remove them. Is there a way to find the corrupted archives in bash?
2
votes
1answer
516 views

unzip two different kind of file extensions

Note here, .zip and .jar is just an example, my file extensions are different. Suppose I have a directory which can contain number of zip files a.zip b.zip c.zip AND/OR z.jar x.jar y.jar along ...
1
vote
1answer
2k views

UNZIP failed while extracting

%> unzip V15679-01_3of3.zip Archive: V15679-01_3of3.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. ...
4
votes
2answers
635 views

Help with unzipping a .dd.gz, possibly corrupted

I recieved this file that I was told was a copy of a hard drive (or disk). The file is "sheeva-mem.dd.gz". I tried to unzip the file in a linux Fedora machine. This yielded "unexpected end of file". ...
1
vote
1answer
528 views

How can I view files in zip using putty?

I want to view file list in zip archive using putty without unzip the archive. Is it possible?
2
votes
1answer
2k views

Extracting the contents of a zip file with overwrite all mode in centos 5

How can I Unzip a Zip file which contains different directories and sub directories with the overwrite mode ? I mean i want the zipped contents to overwrites any existing files (be it old be it new). ...
2
votes
2answers
289 views

Unzip to location

I am using unzip through putty and it works ok. However, using the same command through a .NET C# SSH library (Renci.SshNet) gives different results. SshClient s = new SshClient("ssh_host", ...
4
votes
1answer
3k views

What's the difference between gunzip and unzip?

What is the difference between gunzip and unzip? Tried to search but couldn't find anything relevant with this.
4
votes
3answers
716 views

How can I list all *.doc files in a Zip archive, including files in subdirectories?

I have Zip files, that might look like this: $ zipinfo -1 zip.zip doc.doc dotx.dotx xls.xls ppt.ppt txt.txt c.c subdir/subdir2/doc.doc subdir/xls.xls subdir/ppt.ppt subdir/c.c subdir/txt.txt ...
2
votes
1answer
331 views

referring to files inside a jar or zip files in Linux

I am wondering if I can refer to files inside JAR or ZIP files using URLs. I mean, without using a tool (such as the Java Jar utility) but just at the operative system level. For example, if I have a ...
3
votes
2answers
1k views

How to create multiple zips from a directory containing a million xml files?

I have a directory containing million xml files. I want to create multiple zip files containing n number of xml files. For ex: if n = 10000, then I want to create 100 zip files i.e. each zip file will ...
4
votes
1answer
9k views

Find a file in lots of zip files (like find command for directories) [duplicate]

Possible Duplicate: Find recursively all archive files of diverse archive formats and search them for file name patterns I need to search for a file in all zip files in a directory. Is ...
2
votes
3answers
703 views

Possible to get “old” time stamp behaviour?

When downloading a file or e.g. unzipping one, the time stamp is not set to when the file appeared on my harddisk, which is what I want. See this example ~$ wget ...
3
votes
2answers
727 views

Search for files with a specific size inside recursive zipped archives

I have a folder with several files. These files are either .xml or .zip files. These .zip files contain .xml and/or .zip files. These .zip contains also .xml or .zip, and so on... until we finally ...
4
votes
2answers
812 views

Find recursively all archive files of diverse archive formats and search them for file name patterns

At best I would like to have a call like this: $searchtool /path/to/search/ -contained-file-name "*vacation*jpg" ... so that this tool does a recursive scan of the given path takes all files with ...
1
vote
4answers
2k views

How to unrar and unzip files recursively?

I have a huge file that contains zips and rars with zip and rar files located within on a linux box. I basically need a script or one-liner that will recursively hunt through the directories and ...
16
votes
4answers
35k views

How to unzip a multipart (spanned) ZIP on Linux?

I need to upload a 400mb file to my web server, but I'm limited to 200mb uploads. My host suggested I use a spanned archive, which I've never done on Linux. I created a test in its own folder, ...
8
votes
4answers
5k views

How can I force unzip / zip not to create a subdirectory when I extract it?

Depending on how a zip file is created, sometimes it will extract all of the files directly, and sometimes it will extract the files into a subdirectory. If the latter is true, how can I force the ...
4
votes
2answers
2k views

How do I create a ZIP archive that preserves only the structure of the target directory and below?

I need to create a zip archive where the unzipped result preserves the directory structure from the specified directory down. I also need to do this without actually switching to the directory. My ...
19
votes
1answer
22k views

How do you extract a single folder from a large tar.gz archive?

I am using this command on a 5GB archive tar -zxvf archive.tar.gz /folder/in/archive is this the correct way to do this? It seems to be taking forever with no command line output...
3
votes
0answers
422 views

ZIP password finders for Linux?

I'm trying to extract ZIP files for an encrypted archive I've forgotten the password for. So far I've found the tool fcrackzip which does what I want, but its own manpage states that it has numerous ...
5
votes
1answer
8k views

Zip everything in current directory

I'd like to compress and package everything, including files and folders in current directory, into a single ZIP file on Ubuntu. What would be the most convenient command for this (and name of the ...
4
votes
3answers
1k views

Is there a command to list the compressed file sizes for files within a .zip file?

I'd like to see the absolute size in bytes of each file that has been compressed into single zip file. Having read the zip man page, I'm not sure that that utility can do it. This is on Mac OS X. ...
7
votes
2answers
755 views

Remove accidentally extracted files [duplicate]

Possible Duplicate: How to de-unzip, de-tar -xvf — de-unarchive in a messy folder? This is a pretty annoying occurrence. Sometimes, I download an archive (tar.gz, tar.bz2, zip, rar, ...
3
votes
3answers
295 views

Setting execution right to whole directory - is it good or bad idea?

I have a zip file containing lot of files and directories for a certain application which should be running on Linux. Some files needs to be set as executable, but the zip file format afaik does not ...
7
votes
3answers
16k views

Searching for a string on multiple zip files.

I have a folder that contains about 200 zip files. Each zip file contains only one text file in it. I would like to search for a specific string in all the text files in all the zip files. I tried ...
10
votes
1answer
2k views

The zip format's external file attribute

This is a slightly exotic question, but there doesn't seem to be much information on the net about this. I just added an answer to a question about the zip format's external file attribute. As you can ...
16
votes
3answers
28k views

Extract only a specific file from a zipped archive to a given directory

I need to pull a single file from a ZIP file which I know the path to. Is there a command like the following: unzip -d . myarchive.zip path/to/zipped/file.txt Unfortunately, the above command ...