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

learn more… | top users | synonyms (1)

12
votes
5answers
1k views

How to de-unzip, de-tar -xvf — de-unarchive in a messy folder?

Usually, I unarchive things by $ mkdir newFolder; $ mv *.zip newFolder; $ cd newFolder; $unzip *.zip but sometimes I get lazy and just do in an arbitrary folder $ unzip *.zip so time-to-time messing ...
7
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
707 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 ...
13
votes
3answers
23k 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 ...
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 ...
6
votes
1answer
7k 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 ...
6
votes
2answers
4k 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
3answers
14k 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 ...
6
votes
2answers
789 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 ...
3
votes
2answers
242 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 ...
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 ...
3
votes
3answers
289 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 ...
2
votes
2answers
119 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 ...