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
0 answers
3 views

Zip folder content but include folder

I'm currently trying to create a ZIP file during a GitLab CI job including all data of the CI job (ZIP runs directly inside the folder): zip -r helper.zip ./ -x .\* helper-hooks.json __MACOSX The ZIP ...
  • 203
0 votes
1 answer
23 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'...
1 vote
0 answers
26 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 ...
0 votes
2 answers
42 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 "...
  • 3
0 votes
0 answers
28 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' : ...
10 votes
6 answers
2k 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 ...
0 votes
1 answer
46 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, ...
  • 5,481
0 votes
1 answer
39 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 ...
0 votes
1 answer
24 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 .....
  • 1,952
0 votes
1 answer
43 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 ...
0 votes
3 answers
145 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 ...
0 votes
1 answer
160 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
0 votes
1 answer
203 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 ...
  • 1
1 vote
1 answer
142 views

Unzip a zip file whose content's name is too long in Ubuntu terminal

I have a zip file, sample.zip, which contains a PDF whose name is too long. I tried to unzip it in Ubuntu terminal through unzip sample.zip however, it shows an error that "File name too long&...
  • 113
-1 votes
1 answer
61 views

unzipping piping error on linux system

I am trying to extract windows 10 and install it on linodes platform and my command is as follows: wget -O- --no-check-certificate https://www.dropbox.com/s/e9vh4ahwcogi4xo/Win10_21H2_English_x64.zip?...
  • 1
1 vote
1 answer
18 views

How to compress files include subfolder based on a file modification date

I like to make a script file to backup a upload folder (that have big size), problem is script will backup every midnight so it's quite big zip file. 1st March Upload ├── sub01/ │ ├── file-01.jpg (1 ...
  • 113
1 vote
1 answer
29 views

Zipping a folder that contains a zip file (not visible on MacOS unless unzipping via CLI)

I am attempting to create a ZIP archive that contains 5 PDFs and one additional ZIP file (which resides in the folder above the current working folder). This seems to work, but only to a certain ...
0 votes
2 answers
358 views

How to zip specific individual files in a directory

for example, this folder ~/folder1/folder2 contains a lot of files like: abc_0101.txt abc_0102.txt ... abc_0201.txt abc_0202.txt ... abc_0301.txt abc_0302.txt ... abc_0401.txt abc_0402.txt ... how to ...
0 votes
0 answers
158 views

BASH: How to check if a file with a specific content is inside a png image

I have recently found a way to put files inside a PNG image without destroying the image using cat example.png example.7z > example-combined.png, which also works with standard ZIP archives. This ...
0 votes
0 answers
130 views

Zip files according to quarterly year

I have folders sorted according to the date from the past 5 years. I'm looking for ideas on a script or a way to zip all the files according to the quarter year to save my disk space. For example, I ...
0 votes
1 answer
61 views

For all zips, and unzip in working directory and maintains its structure

With this command find . -name '*.zip' -exec unzip '{}' ';' we find all zip files under . (directory), then unzip them into the current working directory, However, the structure is gone. /backUp/...
1 vote
1 answer
278 views

What should dirname and basename be in this command?

With this command, we can recursively unzip archives in a directory and its sub-directories and remain its structure in the current working directory. find ../backUp/ -name "*.zip" | ...
2 votes
1 answer
261 views

Writing a regex for the Linux unzip command to select files to extract

I have a bash script that invokes the unzip command, and it needs to extract just the files in which the path to the file includes a subdirectory name that is one of 3 particular words: "a", ...
  • 135
0 votes
3 answers
87 views

What would be a command to zip all folders in a directory

I have a few folders in a directory that I want to zip individually. Root -folder1 -folder2 into: Root -folder1.zip -folder2.zip -folder1 -folder2 What would be a command to ...
  • 135
0 votes
1 answer
817 views

How to fix unzip and zip installation failure in ubuntu 20.04

I have been trying to install zip and unzip using Linux terminal (Ubuntu 20.04), but I end up getting this error (image attached). What could be the reason for this? I have tried to use these commands ...
0 votes
1 answer
350 views

"curl" downloads .zip file as ASCII text (zipfile is not corrupted!)

I want to download package from Artifactory. If I download it manually from Artifactory UI, and transfer that file to Linux server (RHEL 8) I can see that file is in proper ZIP format: file arena-web....
  • 198
1 vote
0 answers
51 views

UNIX: How to zip a file as soon as it's landed in a directory

We are getting these huge files from a source system which fills up the storage. Requirement is that these files should be compressed(zip/gz) as soon as files are landed in the file system. These are ...
0 votes
0 answers
58 views

How to ask unzip rename files when file is decompressed to a case insensentive file system?

$ unzip -v | head -n 1 UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP. I see the following question when I run unzip. Basically, there are files in the archive whose names are different ...
0 votes
0 answers
115 views

Zip -recursive direcotry and it start file

I am trying to zip a folder that contains others files and folder by getting as parameter the directory and the zip name. My script is in antoher folder than the one that I should zip (just a ..). I ...
-3 votes
1 answer
4k views

How to extract a zip file inside a GitHub repository?

GitHub GUI allows me to upload a zip file to a repository but it doesn't allow me to extract it. I could upload the files directly (unarchived) but the problem is that some of the files are ...
  • 13
2 votes
0 answers
209 views

Compare zip file and extracted directory

What is the simplest way to compare a zip file and a directory that has been extracted from the zip file? I would like to delete the zip file if they are the same. Example. Need to check if Archive....
  • 121
2 votes
3 answers
370 views

tar list full filename without directory

I have a tgz file with the following file structure - folder - subdir1 - file1.txt - file2.text - subdir2 - file1.txt When i run tar -tf folder.tgz, it outputs the following:...
0 votes
2 answers
2k views

Unzip & Rename a File in One Command

I have a zip file that contains a CSV and I would like to unzip that into a specific folder and rename the file the same as the zip file name. For example., I have a zip file named: youtube_videos.csv....
  • 123
0 votes
1 answer
43 views

Command Line ZIP - How to ZIP an entire folder, but dodge the other zips present?

I've been tasked to update a few of our sites and so, before doing so, I have to zip the public_html folder so I have a backup. Problem is, public_html has a bunch of other ZIPs that are older backups ...
  • 103
0 votes
2 answers
80 views

How to create a file of X bytes that will not compress with zip

I am load testing an application that is essentially an upload/download request/reply. Upload a file, zip the file, send the zipped file somewhere. I want to load test it by sending files of X bytes ...
0 votes
1 answer
116 views

Create set of fixed sized compressed files from a large number of files

I have set of large number of files to be archived in a linux server. I need to compress those files in to set of 1GB compressed files. I am using gzip to compress the files but I don't know the final ...
  • 101
0 votes
0 answers
114 views

dnf install php-zip conflicting requests

i'm try install php-zip in fedora 34 He tells me there is a conflict: Problem: conflicting requests - nothing provides libzip(x86-64) >= 1.8.0 needed by php-pecl-zip-1.19.5-1.fc34.remi.8.0....
  • 1
2 votes
1 answer
51 views

List files in a zipped archive within a zipped archive

So far this thread (Extract only a specific file from a zipped archive to a given directory) has helped me tremendously as I was able to generate a file list of all the files in the archive, using: ...
1 vote
1 answer
61 views

Partially zip files in a directory and move to pCloud account

I have a 60GB directory, including thousands of files with random names and file extensions, but no sub-directories. Since I only have 12 GB of free space left, I need to partially zip this directory'...
0 votes
2 answers
141 views

I cannot untar a zip file keep getting error

From the link below I try to follow the steps and I got the curl portion to work but when I type tar zxf admit.tar.gz I get tar: Unrecognized archive format tar: Error exit delayed from previous ...
0 votes
3 answers
742 views

How to extract files recursively but keep them in their own folders?

This is how I'm extracting all the files in a folder (recursively): find -iname \*.epub -exec unzip -o {} \; But the extracted files end up all in the parent folder: Parent (Extracted Epub files) ...
0 votes
1 answer
179 views

How to automatically replace mimetype when unzipping?

I'm using the following command to unzip epub files recursively inside a folder: find -iname \*.epub -exec unzip {} \; It works. But the terminal asks me this each time a file is being extracted: ...
1 vote
2 answers
587 views

I need to zip all files and subdirectories in a folder including those that start with a dot

I need to zip all files and subdirectories in a folder including those that start with a . (dot). I'm in a folder called synthesis and I need to zip all the files and subdirectories under it (but not ...
  • 11
0 votes
1 answer
64 views

files zipped using function not naming correctly

I'm probably missing something basic with bash function variable syntax here. My understanding of the zip command's syntax is that it's zip newfilename.zip filetobezipped. So I want my function to zip ...
  • 3
0 votes
1 answer
42 views

access name of unzipped file inside a function

I'm running Ubuntu on WSL2. I frequently download zipped homework files from my school's website. They go into my Downloads folder on Windows. I want them copied into a particular path on my Linux ...
  • 3
1 vote
1 answer
107 views

Synchronize zip-archive after removing files

Using the zip command zip -qrj dir1/archive.zip dir2/*.jpg. After removing a file from dir2 I want to synchronize the archive using dir2 as reference. I.e. remove the file from the zip archive as well....
  • 129
0 votes
0 answers
155 views

Unable to extract images from a zip file

I download the train2017.zip file of the 2017 COCO dataset (https://cocodataset.org/#download). The file only has a lot of .jpg images. I'm trying to unzip the file by unzip train2017.zip on my linux ...
2 votes
1 answer
297 views

Can busybox unzip tool overwrite symlinks?

I'm using the Busybox 1.32.0 package tools in an embedded device. When I'm in Ubuntu based x64 platforms, the unzip tool packaged there can extract over a destination directory without prompting any ...
  • 133
0 votes
1 answer
190 views

I want to find all the greater than 100 MB and older than 20 day and want to zip them only .TXT and .txt files individually

I'm using find $HOME -type f -size +100M -mtime +20 -exec zip -m '{}.zip' '{}' \; This command is compressing all the files. I want to zip only *.TXT and *.txt files only. Any idea how can we do ...
2 votes
2 answers
527 views

Unzip a .zip which includes directories with spaces in Name

I have a problem with unzipping my transfered .zip file. Firstly, I zipped a owncloud data directory with the encryption parameter. Then I transfered it to my new Server und would like to unzip it ...
  • 23

1
2 3 4 5
11