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

learn more… | top users | synonyms (1)

2
votes
3answers
39 views

How to know the path to a specific file in a zip archive, without extracting it?

I only know the filename but not its exact location. I would like to extract only that file from the archive. And I need to know its location in the archive.
6
votes
4answers
244 views

How to only zip the files of a specific user?

I like zip, it's simple, but recently I came with the need of only zipping the file owned by one user in a directory. I read the manual and I can't find any option to for example do things like: ...
1
vote
1answer
41 views

Compress zip files with higher compression

I have a large number of zip files that were compressed using the zip command. I would like to recompress them with the -9 flag to improve the compression ratio. Does anyone know if that can be done ...
0
votes
2answers
53 views

Unzipping error

When I enter unzip ../founation-latest.zip, it outputs this: warning [../foundation-latest.zip]: 248 extra bytes at beginning or within zipfile (attempting to process anyway) The file is 138KB. ...
0
votes
1answer
111 views

Depsolving for php-pecl-zip

I'm having trouble getting rid of my depsolving errors, and I've been left to figure this one out on my own. It all started when I wanted to upgrade from PHP 5.2 to PHP 5.3 (heaven forbid), and I was ...
1
vote
2answers
65 views

Text substitution inside compressed files

I have several zip files, each one having several text files inside them. I want to substitute all occurrences of a in these text files with b, and leave them zipped with the same structure. If I ...
2
votes
1answer
59 views

Find & Delete directories in .zip files

Question 1 : In many .zip archive files I would like to delete directories anwsering to a name pattern. In a "normal" directory I used : find . -type d -name "pattern" -mtime +30| xargs rm -r Is ...
0
votes
1answer
41 views

Order a list of files, by date modified, then unzip them in that order

I have a list of zip files, that must be extracted by date modified, they contain updated images and the strange way the local mls provides them means that newer zip files container newer versions of ...
3
votes
4answers
393 views

How to zip recursively all subdirectories that only contain text files

I have a backup from a disk that contains data files and analysis. The dir structure and names are not really consistent. To save space, I would like to zip all the subdirs that only contain data ...
2
votes
1answer
88 views

tar.bz2 7zip selective extract prformance

We use tar.bz2 as our archive of server logs. We also write tools that selectively parse these archived logs. Many times I must regex-search one file’s lines in the archive to determine if other ...
2
votes
2answers
83 views

How to use `expect` with `zipcloak`?

I create a zip file using zip which includes several files and directories, named test.upd. Now I want to use expect to automatically handle the password encryption. Here are two bash scripts, both do ...
2
votes
1answer
135 views

Facility on AIX to ZIP a list of files

I'm working with an external company who is using AIX (version unknown) as their platform. They are required to FTP me a ZIP file containing multiple files. Does the UNIX utility zip exist on a ...
0
votes
3answers
89 views

unzip a directory in unix [closed]

I tried to unzip a folder in Unix: $ unzip sample.zip This is creating the root structure a/b/c/d/e/f/sample. Please advise. I need to unzip a folder in the current directory.
3
votes
2answers
169 views

Create Zip for each subfolder but containing only matched files

I am trying to figure out how to create a zip file for each subfolder containing only files that match my criteria. For instance I have: Folder1 Folder2 Folder3 Each folder contains the same set ...
1
vote
1answer
238 views

extract only a specific folder Contents from a zipped archive to a given directory [duplicate]

This is very close to the SO How to extract only a specific folder from a zipped archive to a given directory? I need something close but I always get the folder with the contents, not it's contents ...
1
vote
2answers
183 views

Having trouble uncompressing a few files [duplicate]

So I have to uncompress 4 different files. When I do file file1 file file2 file file3 file file4 for example, different messages are displayed. For example one starts like "gzip compressed data, ...
2
votes
3answers
145 views

zip a directory that name start with `-` [duplicate]

How can I zip a directory like -foo? $ zip "-foo" "-foo" shows only help page. I think -foo is recognized as a options, but I don't know how to solve it.
8
votes
1answer
178 views

Do any archive utilities exist that can preserve the date created file attribute on NTFS-3G?

I tried the -X switch on zip, but that did not save the date created attribute. I can get it using this method. When a file is added to a zip archive using 7-Zip, it preserves the date created and ...
3
votes
3answers
817 views

speed up gzip compression

Is it possible to speed up the gzip process? I'm using mysqldump "$database_name" | gzip > $BACKUP_DIR/$database_name.sql.gz to backup a database into a directory, $BACKUP_DIR. the manpage ...
0
votes
1answer
127 views

Does zip's -u flag pay attention to deleted files?

This website about Linux's zip utility says this about the -u flag: Replace (update) an existing entry in the zip archive only if it has been modified more recently than the version already in the ...
2
votes
2answers
339 views

Zip folder without including path to folder and require only one argument

I'm trying to make a zip function that'll do all the steps I typically do when zipping a file or folder. Say my current directory is ~, and I want to zip a folder named Folder1, whose file path is ...
2
votes
2answers
148 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
252 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
594 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
517 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
2answers
1k 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
1k 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
189 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
403 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
526 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 ...
5
votes
1answer
5k 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
896 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
3answers
248 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
560 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
214 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
991 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 ...
5
votes
2answers
2k 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
471 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
186 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
752 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 ...
1
vote
2answers
15k 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
281 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
117 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
457 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
305 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 ...
0
votes
1answer
1k 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. ...
3
votes
2answers
269 views

Linux Need Basic Libraries Without Internet

So I've been battling with my debian install lately, it doesn't have the firmware for either eth0 or wan0 NIC's. However, I got a firmware.zip file that I need to extract to /lib/firmware. The problem ...
4
votes
2answers
513 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
367 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
847 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). ...