Skip to main content

Questions tagged [zip]

For questions about ZIP files and associated tools. ZIP is a file format used for data compression and archiving.

Filter by
Sorted by
Tagged with
0 votes
2 answers
60 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 ...
curiousdannii's user avatar
1 vote
1 answer
48 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 -...
AeroMaxx's user avatar
  • 199
1 vote
4 answers
84 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 ...
CopyOfA's user avatar
  • 123
0 votes
3 answers
83 views

Program which archives "files" from stdin to stdout, without hitting the disk?

Can anyone suggest a program which: Creates some form of archive from stdin, out to stdout, with filenames, and without hitting the disk (the data is sensitive) The program output will eventually be ...
QF0's user avatar
  • 315
0 votes
2 answers
42 views

container options from linux other than tar that work in Windows

I have Windows 10 pc's that do not have winzip or 7zip, or any kind of compression software installed. do not ask why As such the windows10 pc's can only do an unzip. They are unable to work with a ....
ron's user avatar
  • 7,264
2 votes
1 answer
180 views

How to correctly unzip weird character file in zip?

I'm really new in Linuxverse, so please understand if I'm asking standard question. I just downloaded a zip file using this link: https://io.genesis-ark.club/common/20240401/三国名将录(2).zip the first ...
flix's user avatar
  • 143
0 votes
1 answer
18 views

Cannot unzip latest version when archive contains several modifications of a file

[Using Terminal on Mac/Sonoma] I zip my working directory with zip -u archive dir when ending a work session. dir is located on an external USB drive, archive on another external USB drive. I ...
William Deever's user avatar
0 votes
1 answer
132 views

Zip with password on the terminal (Ubuntu 20.04)

I am running the command zip -p mypassword archieve.zip -r downloads/ and it creates a file mypassword.zip What am I doing wrong?
mangolassi's user avatar
0 votes
1 answer
36 views

extract specific filenames from a zip without extracting it

Listing the contents of the zip file as below: wladmin@solarishost:/tmp$ unzip -l -q /tmp/package-391.zip | awk '{ print $4 }' | sed -n '3,$p' | grep -v '^$' myapp/src/stage/bras.war myapp-...
Ashar's user avatar
  • 511
0 votes
1 answer
117 views

Zip the whole contents of a server except for www and access-logs symlinks

I'm moving an account to another server, and I'm zipping everything in the terminal using the command zip -r backup.zip * while on the server's home /. The archive was being created, and when it ...
Faye D.'s user avatar
  • 101
2 votes
2 answers
781 views

How to extract and delete contents of a zip archive simultaneously?

I want to download and extract a large zip archive (>180 GB) containing multiple small files of a single file format onto an SSD, but I don't have enough storage for both the zip archive and the ...
Kumaresh Balaji Sundararajan's user avatar
1 vote
1 answer
50 views

See if any of a number of zip files contains any of the original files in a directory structure

I have a pretty hard problem here. I have a photo library with a lot of photos in it in various folders. I then started using Google Photos for my photos, I put those originals into Google Photos, and ...
Albert's user avatar
  • 161
0 votes
2 answers
394 views

How to have an archive with full paths, BUT without creating a tarbomb?

I want to create an archive file that preserves the absolute path information of the originals, but I have not been able to find a way to do this that does not result in a tarbomb? For concreteness, ...
kjo's user avatar
  • 15.7k
0 votes
1 answer
112 views

How to iterate through directories of zip files and locate & append files without a .zip extension

I have a directory of sub-directories that contain sub-directories which are supposed to be compressed archive files. Structure is illustrated below ParentDirectory |-SubDirectoryA |-File Mr X.zip |-...
McGooks's user avatar
0 votes
1 answer
42 views

Iterate sub-directories and zip files with same prefix and remove original files after compression

I have the current code: for fname in *.*; do prefix=${fname%.*} [ ! -f "$fname" ] || [ -f "$prefix.zip" ] && continue zip "$prefix" "$prefix&...
McGooks's user avatar
0 votes
1 answer
52 views

zip command seems to not doing its job correctly

I use a USB drive to save/load some docker images to/from a USB flash disk and distribute it amongst the team. This is my script to save one of the images: echo "Saving some/image ..." ...
Saeed Neamati's user avatar
0 votes
1 answer
653 views

Creating a zip file incrementally

I currently have a large directory on S3 (>100GB). I want to create a zip archive of this directory. Currently, I download the contents of the directory and create a scratch (temp) directory on the ...
testing09's user avatar
0 votes
2 answers
163 views

How to Find and zip all my pdf files of all subdirectories

I'm trying to find and zip all my pdf files. find works fine: find -iname "*.pdf" I want to zip everything that is printed into 1 file. Thank you for your time.
JEFERSON D's user avatar
1 vote
1 answer
199 views

Create a zip archive with Ark and use the method Store?

How can I create a zip archive using the graphical interface of Ark and use "Store" instead of "Deflate" for compression? UPDATE Apparently, there are significant differences ...
Z0OM's user avatar
  • 3,189
2 votes
1 answer
343 views

Listing the contents of an archive non-recursively using `zipinfo`

Is there a flag that I can pass to the zipinfo command to list the contents of an archive non-recursively? For example, if the target archive contains three directories, which in turn contain five ...
GPWR's user avatar
  • 152
13 votes
1 answer
1k views

Why are directories sometimes listed explicitly in ZIP files?

While building an application that extracts ZIP files I noticed that sometimes ZIP files explicitly contain entries for the directories and sometimes not. Given for example the following structure ...
trivicious's user avatar
0 votes
0 answers
39 views

zip filesync update permissions and owner

I am using the zip -FS command to sync a directory with a zip archive. While it works quite well in general, I have noticed, that this doesn't update changes in file permission or owner. Is there a ...
Sleet2004's user avatar
7 votes
3 answers
3k views

Read file content in a zip file without unzipping?

Given a zip file zipfile.zip, we know that it contains a file called text.txt. Is there a way to read the content of text.txt without unzipping zipfile.zip?
Idonknow's user avatar
  • 173
0 votes
1 answer
251 views

Pipe zip & unzip together to form the identity function

Update: On closer inspection of the man page it appears that it is not yet supported by unzip to read archives from standard input. The man page refers the user to funzip instead. I guess this makes ...
Rewbert's user avatar
  • 131
0 votes
1 answer
407 views

Is possible compress and uncompress a file with a password but considering an expiration date too?

In Linux about compression files can be accomplished with the tar and zip/unzip commands, perhaps more. I know that is possible establish a password protection for security reasons. The question is: ...
Manuel Jordan's user avatar
-2 votes
1 answer
72 views

How to install Apache and DNSmasq tools, without Terminal

How can I install apache server and dnsmasq without using a terminal? Just downloading ZIP files and manually configuring them. The easiest is to install the installation tools from the command line, ...
kevin david Mark's user avatar
4 votes
1 answer
248 views

How do I create a zip that preserves unicode character composition on linux?

I'm on Debian. I have a file called Sóanr.jpg. According to https://emojidissector.com/, this is made of the following code points: S 0053 LATIN CAPITAL LETTER S o 006F LATIN SMALL LETTER O ...
bennlich's user avatar
  • 143
0 votes
1 answer
107 views

Zip files contained in a file over a loop

I have a file with X paths to files I want to zip. I have this loop: while read -r path; do zip -u "$zip_file" "$path" done <"$paths_file" I have this error: zip ...
Vincent Decaux's user avatar
0 votes
1 answer
213 views

Extract all content from multiple zip files contained in compressed tar archive

I receive a tar.gz file which packages multiple zip files - reproduced below: $ rm -Rf zipdir; mkdir zipdir; echo foo > zipdir/a.txt; echo bar > zipdir/b.txt; cd zipdir; zip -m a.zip a.txt ; zip ...
Daniel Krizian's user avatar
1 vote
1 answer
334 views

Can a quiet zip still show warnings for missing files?

I often use zip with the -q flag (actually -r -q) for a quiet operation at the command line. Routinely I also then unzip each file I create, and check by eye whether the contents look correct; before ...
user7543's user avatar
  • 256
5 votes
1 answer
4k views

Difference between ar, tar, gzip, zip and when should I decide to choose which one?

I had a use case where I needed to pack a bunch of files into one. And all above commands does the same. I know gzip compresses my files but lets say space is not at all an issue for me then in that ...
Himanshuman's user avatar
13 votes
3 answers
8k views

If the maximum size of a ZIP archive is 4 GB then how can I have a 33 GB ZIP archive?

I have this: -rw-r--r-- 1 user user 36166999908 Jan 29 2022 tmp.archive.part1.zip -rw-r--r-- 1 user user 5579574562 Jan 29 2022 tmp.archive.part2.zip -rw-r--r-- 1 user user 5097536636 Jan 29 ...
Gunther Schadow's user avatar
0 votes
1 answer
488 views

Are .DAT files the same as compressed files in Unix?

Please confirm if .DAT extension files are the same as compressed format files (.zip ) in Unix. As I try to use gzip filename.DAT then is the original 2 GB file size the same after compression? Is ...
kumar's user avatar
  • 1
1 vote
0 answers
173 views

unzip a windows archive - some subdirectories are "permission denied"

I have a zip-file created on Windows, so - no specific permissions flags were assigned to the files inside it. When I unzip the archive: unzip filename.zip -d ~/path/to/destination Some (only some, ...
Alex's user avatar
  • 111
1 vote
2 answers
837 views

How to fix "unzip: Unrecognized archive format" in FreeBSD? [closed]

I try to unzip a folder that I copied to FreeBSD from another machine through SSH/SCP. However, I keep getting the error unzip: Unrecognized archive format which to me does not make sense in this case....
Anna Madsen's user avatar
4 votes
1 answer
4k views

How to extract the tar.gz file but without overwriting existing files?

With the unzip -n /path/to/filename/filename.zip command the compressed file is uncompressed but does not overwrite existing files. This approach is useful when the same compressed file was ...
Manuel Jordan's user avatar
0 votes
1 answer
1k views

Convert octet-stream to zip file

I tried to zip a backup folder that contains 50 GB of data. The result is a octet-stream (full 50 GB) instead of a zip file. I have already erased the source data before I realize the issue. Is there ...
user19192927's user avatar
3 votes
2 answers
948 views

gunzip multiple gz files with same compressed file name in multiple folders

I have a directory where there are multiple folders, each folder contains multiple .gz files with the same zipped file name "spark.log". How can I unzip all of them at once and rename them ...
sojim2's user avatar
  • 143
0 votes
1 answer
463 views

how to skip "is this a single-disk" archive message

after running this code terminal asks me "is this a single-disk archive : y/n". where I need to type y and press enter but I want to do this from the code I am running. In other words I don'...
Emam Kownine's user avatar
1 vote
0 answers
135 views

Compress Zip to 7zip

I would like a shell (or other terminal based) script to convert zip files to 7z format. Some zip files contain folders with more zip files in them. This needs to work recursively since there are zip ...
Just saying's user avatar
0 votes
2 answers
787 views

Zip files that match certain data pattern within the file

I have a directory full of files *.CLM_01. I want to create 1 zip file with all files which have the value "005010X222" inside the file. Basically, there are a few files that have "...
Hedi's user avatar
  • 3
0 votes
0 answers
191 views

unzip: can't set permissions of directory 'folder' : Invalid argument

I have the below script to unzip a .zip file and print out a .txt file of the files in the .zip but when I run the script, I get this output: "unzip: can't set permissions of directory 'folder' : ...
Shortytot's user avatar
10 votes
6 answers
6k views

Fastest way to merge millions of small files together

I regularly need to transfer millions of small files (small images, txt, json) with average of 5-50k per file between servers or to aws s3. Is there a faster to merge them into a single file to ...
Haotian Zhang's user avatar
0 votes
1 answer
1k views

What is the kind of encryption used in Zip 3.0?

I am using zip on Arch and the version is given as "Zip 3.0 (July 5th 2008) by Info-Zip. Compiled with gcc 11.2.0 on Mar 22 2022. The encryption compilation information reads "[encryption, ...
Tyler Durden's user avatar
  • 5,773
0 votes
1 answer
1k views

How to unzip folder and change directory to extracted folder

I'm trying to make a script where I can unzip a file and then cd into that unzipped file (ie. unzip test.zip and then cd into the test folder). The problem is that the name of the zip file varies and ...
Shortytot's user avatar
0 votes
1 answer
340 views

How to find a property file matching a pattern in a group of JAR files?

I'm using bash shell. I have a group of JAR files in directories at different levels > find . -name "*.jar" /tmp/jars/META-INF/lib/jackson-datatype-jdk8.jar /tmp/jars/lib/my-custom.jar .....
Dave's user avatar
  • 2,608
0 votes
1 answer
71 views

Zip all folders in current directory

Im new to shell scripting and I was wondering if there was a way to zip all subdirectories individually in the current directory doing something that seemed familiar to high level programers. ie: for ...
user532618's user avatar
0 votes
3 answers
2k views

Sending Zip files through mailx command

I have a zip file named : zip_final.zip I have to attach this file as a attachment and send the mail. Also, I have to display all the file_names present inside the zip file in the mail body. I have ...
Venkatesha Prasad S's user avatar
0 votes
1 answer
1k views

Trying to unzip the file but it's giving invalid zip file which overlapped components (possible zip bomp)

Same zip file can be unzipped with the same command on jump node but not on data nodes and the version is same in all the nodes
Akshitha BM's user avatar
0 votes
1 answer
1k views

Unzip files with the same name from multiple directories

I have the file archive.zip located in multiple directories, i.e.: dir/001/archive.zip dir/002/archive.zip dir/003/archive.zip ... Is there a way in which I can recursively unzip all the archive.zip ...
Ailema's user avatar
  • 1

1
2 3 4 5
12