4
votes
3answers
51 views

Is it possible to view the list of file names of a zip file which is inside another zip file?

I know I can use unzip -l file.zip to view the file list of a zip file. But a got a zip file inside another zip file. I tried unzip -l file.zip/sub_file.zip, but failed. Is it possible to view the ...
0
votes
1answer
71 views

Error unzipping file through ksh, unzip works through bash

I have an auto-generated zipfile foo.zip on a Red Hat server that needs to be extracted to a particular location /bar. This is done through an install script using ksh. When the script executes unzip ...
1
vote
1answer
719 views

How can I ignore “zip warning: name not matched” when using zip command with -d option?

I am creating an sh file to run multiple commands in the background. At some line in this file, there is a command to update a zip file like: zip -d archive.zip file.txt This file.txt might not be ...
1
vote
1answer
555 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
200 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
131 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
623 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
455 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
696 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
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 ...
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 ...
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 ...
5
votes
2answers
8k 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 ...