Questions tagged [zip]
For questions about ZIP files and associated tools. ZIP is a file format used for data compression and archiving.
566 questions
11
votes
1
answer
656
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
61
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
175
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
313
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
197
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
242
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
252
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
78
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
74
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
89
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
78
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
997
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
177
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
816
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 -...
1
vote
4
answers
407
views
Zip all files in directory to multiple independent outputs
I am trying to zip all files in a single directory into multiple independent output zip files. What I mean by this is that I do not want to produce a split archive; rather I would like multiple zip ...