1
vote
1answer
240 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 ...
2
votes
3answers
187 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 ...
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
465 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
307 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 ...
3
votes
2answers
570 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 ...
1
vote
4answers
1k 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 ...
7
votes
4answers
4k 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 ...
6
votes
4answers
2k views

Copy a File From One Zip to Another?

I have a file named 'sourceZip.zip' This file ('sourceZip.zip') contains two files: 'textFile.txt' 'binFile.bin' I also have a file named 'targetZip.zip' This file ('targetZip.zip') contains ...
3
votes
2answers
7k views

Excluding a directory when zipping files

I've got a bash script that does something like this: zip -0 ../backup/backup.zip \ -r ./* \ -x \*CVS\* \ -x *Thumbs.db* \ The directory it's backing up is a SVN archive (it used to be CVS back in ...