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
-1 votes
1 answer
49 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?...
user avatar
  • 1
1 vote
1 answer
15 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 ...
user avatar
  • 113
1 vote
1 answer
20 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 ...
user avatar
0 votes
2 answers
19 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 ...
user avatar
0 votes
0 answers
63 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 ...
user avatar
0 votes
0 answers
56 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 ...
user avatar
0 votes
1 answer
27 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/...
user avatar
1 vote
1 answer
123 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" | ...
user avatar
2 votes
1 answer
86 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", ...
user avatar
  • 135
0 votes
3 answers
58 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 ...
user avatar
  • 135
0 votes
1 answer
135 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 ...
user avatar
0 votes
1 answer
164 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....
user avatar
  • 178
1 vote
0 answers
49 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 ...
user avatar
0 votes
0 answers
33 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 ...
user avatar
0 votes
0 answers
39 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 ...
user avatar
-3 votes
1 answer
2k 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 ...
user avatar
  • 13
2 votes
0 answers
121 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....
user avatar
  • 121
2 votes
3 answers
363 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:...
user avatar
0 votes
2 answers
674 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....
user avatar
  • 123
0 votes
1 answer
35 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 ...
user avatar
  • 103
0 votes
2 answers
49 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 ...
user avatar
0 votes
1 answer
51 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 ...
user avatar
  • 101
0 votes
0 answers
33 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....
user avatar
  • 1
2 votes
1 answer
34 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: ...
user avatar
1 vote
1 answer
47 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'...
user avatar
0 votes
2 answers
85 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 ...
user avatar
0 votes
3 answers
145 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) ...
user avatar
0 votes
1 answer
62 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: ...
user avatar
1 vote
2 answers
144 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 ...
user avatar
  • 11
0 votes
0 answers
19 views

Xarchiver can't extract file whose name contains chinese characters

The file whose name contains chinese character can be extracted with 7z command: 7z x 测试.zip 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-...
user avatar
  • 35
0 votes
1 answer
34 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 ...
user avatar
  • 3
0 votes
1 answer
41 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 ...
user avatar
  • 3
1 vote
1 answer
43 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....
user avatar
  • 129
0 votes
0 answers
108 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 ...
user avatar
2 votes
1 answer
158 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 ...
user avatar
  • 133
0 votes
1 answer
145 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 ...
user avatar
2 votes
2 answers
298 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 ...
user avatar
  • 23
3 votes
8 answers
886 views

Extract multiple files at once in the terminal

I have a directory containing hundreds of zip files. I want to be able to select about fifty files and extract them all at once using unzip (or 7z) in the terminal. The files have completely different ...
user avatar
  • 3,311
1 vote
0 answers
38 views

extracting filenames in ubuntu with non-latin encoding which were archived in windows

This issue has been asked quite a lot (e.g q1, q2), but is still far from solved , at least in Ubuntu 20.04 with the default zip tools (zip, file-roller). The zip files are created in Windows, and in ...
user avatar
  • 11
1 vote
0 answers
106 views

zip - difference between "." and "* .[^.]*" patterns when using -r flag

While recursively zipping a directory contents (including hidden files and directories) using zip command with -r flag, is there any difference between: zip ../foo.zip -r . and: zip ../foo.zip -r * .[...
user avatar
  • 111
1 vote
1 answer
85 views

What does ";1" mean at the end of my .zip file?

I have received a zip file but the actual filename is data.zip;1 I have tried to unzip on Linux 7.1 but the command fails. What does the ;1 at the end of the file mean? Ran file 'data.ZIP;'. The ...
user avatar
  • 11
1 vote
1 answer
56 views

Making Linux unzip command just extract files from directories whose names contain a given string

I have a zip archive that contains a directory hierarchy of files. I want to use the Linux unzip command to extract just the subset of these files that have a particular string somewhere in the ...
user avatar
  • 135
0 votes
1 answer
62 views

Can I add files to the folder which is being zipped?

Let's say I have a python script which generates some file file_i.yo in folder folder ever second. After a while I decided that I have to zip the current state of folder and send it somewhere. Thus I ...
user avatar
0 votes
2 answers
614 views

Create/decompress Zip file with LZMA compression?

According to PKWARE's Zip Appnote, it is possible to compress individual files in Zip files using LZMA (see section 5.8 LZMA - Method 14). Support for LZMA seems to have been added around 2013. Is ...
user avatar
  • 1,840
0 votes
0 answers
106 views

Zip all iso files in current directory and move zip file to another directory

I am trying to zip all .iso files into a single zip file. Then move the zip file to another directory. Some of the iso files have very long names. How can I zip ALL iso files, without having to type ...
user avatar
  • 101
2 votes
1 answer
27 views

zip outputs in the wrong place when used in a loop

I have many directories and I want to zip them all. $ mkdir -p one two three $ touch one/one.txt two/two.txt three/three.txt $ ls -F one/ three/ two/ I use zip and it works as intended: $ zip -r ...
user avatar
1 vote
1 answer
232 views

Hour glass/Progress while extracting large file from remote host in shell

I have a shell script, which is using unzip to get a very huge file from a remote directory to local directory within the shell. This operations taking pretty long time, roughly from 20-30 min. #!/bin/...
user avatar
0 votes
1 answer
327 views

zip mail attachment getting corrupt by sendmail

I'm trying send an email through sendmail with zip file attachment using below function. It's working fine with csv file, but a zip format of same csv is getting corrupted. Thanks in advance. ...
user avatar
2 votes
1 answer
255 views

Unzip refuses to accept input through xargs

I am currently struggling with the following problem: Using a bash shell in macOS I want to search my Downloads directory for a zip file with a fixed and variable part in the name, the fixed part ...
user avatar
0 votes
3 answers
362 views

Unzip and store output name on a variable

I have a zip file with always the same name : toto.zip Inside there is only 1 file with the name who can change based on a version: totoInstaller-20210321_titi.pkg I would like to extract the name of ...
user avatar

1
2 3 4 5
11