Questions tagged [zip]
For questions about ZIP files and associated tools. ZIP is a file format used for data compression and archiving.
567 questions
7 votes
3 answers
675 views
Difference between these 2 different ways of extracting files from a zip archive
I am trying to unzip a set of files (3 files). These files contain a lot of random files, duplicate files etc. To do this, I am first unzipping the list of the names of files into a text file, then ...
11 votes
1 answer
679 views
How to get zip to treat any missing file as an error?
To reproduce: ❯ cd "$(mktemp --directory)" ❯ zip result.zip foo no-such-file zip warning: name not matched: no-such-file adding: foo (stored 0%) ❯ echo $? 0 zip should return a non-...
0 votes
1 answer
74 views
Help me understand how Apple IOS does compression
There is zip, and info-zip, correct? Am I missing something? In debian when I create a zip using -Z store, or the -0 option, on a folder with -r, it shows that zip version 1.0 is needed using the file ...
1 vote
1 answer
231 views
unzip returns exit code 1 on empty archive
I have an valid, yet empty zip archive: $ file 22.zip 22.zip: Zip archive data (empty) $ xxd 22.zip 00000000: 504b 0506 0000 0000 0000 0000 0000 0000 PK.............. 00000010: 0000 0000 0000 ...
2 votes
1 answer
340 views
When trying to unzip file from script, I get Segmentation fault (core dumped)
I'm trying to unzip a file in a bash script, but I get a 'Segmentation fault (core dumped)' error following a repeated output message of 'Unzip agent files.' Unzip agent files. Unzip agent files. ...
1 vote
1 answer
268 views
In ImageMagick, how to create a PDF file from an image with the best Flate compression ratio?
Assume you have a PNM or PNG image file, gray or color. With ImageMagick, you wish to generate a possibly small PDF file from it without losing information. So far I though it is simply convert ...
1 vote
1 answer
308 views
Linux extract .zip and preserve all original files timestamps (created/modified/accessed)
It's possible to restore original file timestamps during extraction on linux? I'm tested .zip extraction using 7z, unzip, unar, but only modification date is restored. Environment: Linux Mint 22 ...
1 vote
2 answers
318 views
Does unzip have a way to extract only a specific subfolder without creating that folder's parent dirs?
I want to extract a specific subfolder (and all its contents) from a .zip using the standard unzip tool. I am not interested in its parent directories and don't want them to be created. For example: ...
1 vote
0 answers
87 views
Error while unziping a file from a pendrive from windows on linux mint
I recently (today) installed Linux Mint for the first time. I made my backup on a pendrive, but when I tried unzipping the backup file I made, it gave me the following error: End-of-central-directory ...
0 votes
0 answers
83 views
browse, read, write and rename files in archives, not mount - mc & dolphin
the computer runs a linux kernel and kde6. i use the dolphin filemanager. mark files, add them to an archive is a very usefull option. dolphin can go into archivefiles, but it would be very usefull ...
0 votes
1 answer
98 views
Unzip files, excluding files based on wildcard
I'm trying to extract all the files from a ZIP file, except for files with a specific extension. Succeeds: > unzip myzip.zip Archive: myzip.zip inflating: ... Fails: > unzip myzip.zip -x *....
0 votes
1 answer
88 views
UNZIP from a folder in a zip file to the current path?
I want to install Wordpress on mysite.com/blog I download wordpress-6.6.1.zip from the official site and upload it to the "blog" folder at mysite.com When I unzip the file I see that inside ...
13 votes
3 answers
1k views
Inconsistent “unzip -l … | grep -q …” results with pipefail
The following Bash function gave inconsistent results: # $1 Path to ZIP archive. # Exits with 0 status iff it contains a “.mp3” or “.flac” file. mp3_or_flac_in_zip() { local archive=${1:?No ...
0 votes
2 answers
206 views
How to output a .zip's filenames as raw bytes?
I have a .zip file whose filenames are not being correctly decoded and transcoded into unicode correctly. While I do know what the filenames are meant to be, I don't know what encoding the .zip used ...
1 vote
1 answer
900 views
find all zip files and hash the contents of the zip
I have a bunch of zip files in several directories, there are other non-zip files in these directories also. I am wanting to find all the zip files in the directories such as with find /mnt/sata2 -...