Zip is a file format used for data compression and archiving.

learn more… | top users | synonyms (1)

45
votes
5answers
2k views

Why is the wild card character * so different between commands zip and rm?

I put together a script to do some file operations for me. I am using the wild card operator * to apply functions to all files of a type, but there is one thing I don't get. I can unzip all files in a ...
1
vote
1answer
26 views

Zip files served by nginx do not open on Mac OS X [closed]

I have a Windows machine where I zip my files using a gulp script, and upload them to my Linux machine in some directory under nginx. The files download and open properly on Windows, but when I ...
166
votes
2answers
461k views

Can I zip an entire folder using gzip?

I'm trying to zip a folder in unix. Can that be done using the gzip command?
1
vote
0answers
24 views

Where is my 7za data being written to

I have a weird question about 7za on Centos 7. I am adding a file to a 7za archive using the following command (the total size of the directory is around 40GB) /usr/bin/7za a -ppassword -t7z -mmt=off ...
1
vote
1answer
23 views

unzip/untar files using Curl in ftp server

In the curl command we can delete,rename and move files from a FTP server using Curl like in the command below: curl -v -u username:pwd ftp://host/FileTodelete -Q "DELE FileTodelete" Can we untar ...
1
vote
2answers
652 views

Unzip error, is recovery possible?

I compressed 4 separate folders with some wedding videos (!!) a few months ago. Today I tried to unzip them, and had no problem with the last 2, but the first 2 of them show an error: ...
1
vote
1answer
4k views

UNZIP failed while extracting

%> unzip V15679-01_3of3.zip Archive: V15679-01_3of3.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. ...
52
votes
3answers
75k views

Extract only a specific file from a zipped archive to a given directory

I need to pull a single file from a ZIP file which I know the path to. Is there a command like the following: unzip -d . myarchive.zip path/to/zipped/file.txt Unfortunately, the above command ...
0
votes
2answers
4k views

Adding unzipped files to a zipped folder

I'm trying to add unzipped files to an existing already zipped folder say new folder.zip. Is it possible to use zip -r new folder.zip after adding some unzipped files to them? Will this command ...
7
votes
2answers
652 views

Zip Archive With Limited Number of Files

What command can I use to create zips with a file number limit? I have a folder (no subfolders) of, say, 5000 files, so I would want a command that could divide that number and create 10 individual ...
0
votes
3answers
52 views

Compress and remove original directory with limited storage

On my 3 TB external hard drive, I have a 2.7 TB directory containing relatively small files. I would like to compress this 2.7 TB directory and remove it to keep only the compressed version. The issue ...
120
votes
8answers
546k views

How do I zip/unzip on the unix command line?

How can I create and extract zip archives from the command line?
3
votes
1answer
40 views

Using zip package for debian with password

I'm trying to make a backup .sh script to zip my files and to protect the zip archive with a password. For that, I'm using the zip package (apt-get install zip) and there's an encryption option ...
6
votes
4answers
1k views

Find recursively all archive files of diverse archive formats and search them for file name patterns

At best I would like to have a call like this: $searchtool /path/to/search/ -contained-file-name "*vacation*jpg" ... so that this tool does a recursive scan of the given path takes all files with ...
2
votes
1answer
31 views

Will zgrep recursively search zips embedded within zips?

I am using the zutils version of zgrep v0.9 (not the gzip wrapper script) and to recursively grep zip files starting from the current folder I simply use: zgrep -r "MY_STRING" . This works fine. ...
10
votes
6answers
9k views

How do I recursively grep through compressed archives?

I'm trying to find out what modules use Test::Version in cpan. So I've used minicpan to mirror it. My problem is that I need to iterate through the archives that are downloaded, and grep the files ...
2
votes
3answers
74 views

Unzipping using tar: --exclude too greedy: how to exclude only root-level file?

I’m on a Mac, El Capitan. My zip file structure: README.md source/README.md I can’t seem to --exclude the root-level README.md without also excluding the one in the source directory too. I’ve ...
2
votes
2answers
75 views

Linux + how to compress the old log files automatically

Under /var/log/httpd folder, files are created with huge capacity!!! What solution can I use in order to compress the old files automatically (can logrotate handle this)? If yes, how to configure ...
7
votes
1answer
5k views

Zip the contents of a folder without including the folder itself

I have a directory called folder that looks like this: folder -> root_folder -> some files I want to zip this directory into zipped_dir, I tried: zip -r ...
3
votes
1answer
46 views

“Mac-style” unzipping on linux

I'm using Linux Mint MATE edition, in case that's relevant. I don't know if this is Dropbox specific, but when i download a zip of a folder that was originally produced on a Mac (and that has lots of ...
0
votes
1answer
25 views

How to package web-inf/* and meta-inf/* to a war file via zip command?

I have a foo.war file (JSF web app). I unzipped it just fine. unzip foo.war Then meta-inf and web-inf folders are extracted. I made a change to a properties file inside of web-inf and I repackageed ...
0
votes
0answers
124 views

unzipping files with non-ASCII charactes in the file names

On the Linux distribution that I use, I have been frustrated with the unzip command since every time I have unzipped files where the file names contain non-ASCII characters, the command mangles the ...
1
vote
1answer
37 views

Extract specified types from a zip file

I have a big zip archive and I want to extract only .mp3 files that are located in sites/default/files/ to mymp3 directory. How can I achieve it?
0
votes
1answer
22 views

ziping all files in a folder without all directories [duplicate]

I used this command to zip all files in a folder : zip -r fixedrom.zip /sdcard/dbtools/zipfix/fix/ ; It works fine but the zip should be like this : Meta-inf Recovery System Boot.IMG Etc... But ...
1
vote
2answers
144 views

How to zip multiple directories into individual zip files [duplicate]

I'm new to using the terminal and I found a post on here with the following code that would allow me to zip multiple directories into individual zip files but I only got it to work once. The code is ...
3
votes
2answers
5k views

Error trying to unzip file: “need PK compat. v6.1 (can do v4.6)”

I received a zip file from a bank. I get the following error when I trying to unzip it. unzip filename.zip Archive: filename.zip skipping: SOME_STUFF.pdf need PK compat. v6.1 (can do v4.6) ...
4
votes
2answers
23k views

Error when unzipping a file

I am getting the following error when unzipping a file unzip user_file_batch1.csv.zip Archive: user_file_batch1.csv End-of-central-directory signature not found. Either this file is not a ...
0
votes
2answers
22 views

Why doesn't the -x exclude option in zip seem to actually exclude the path?

Using Raspbian on a Raspberry Pi, I want to back up the /etc files, but not all of them. I'd like to exclude /etc/alternatives, so I used this command: sudo zip -r ...
0
votes
0answers
111 views

Extracting zip inside Midnight Commander, full window goes grey

When extracting a zip file inside Midnight Commander the full putty window goes grey. Extract at least two files from the archive. The extraction succeeds but screen goes nuts (of course it get back ...
10
votes
1answer
16k views

Unzip file contents, but without creating archive folder

I have a file myarchive.zip that contains many directories, files, etc. Let's say this myarchive.zip file lives in a directory called "b". Well, when I use the "unzip myarchive.zip" command, the ...
1
vote
1answer
244 views

Bash script to select files to zip/unzip

I'm trying to zip and unzip files with a bash script, but I'm new and I have problems. I will explain what the script currently does, and then what I wanted it to do. User selects “compress”: a file ...
1
vote
2answers
177 views

How to redirect output of a program to a ZIP file? [closed]

I am running a script which is collecting a log of a server. I need to redirect this logs to a ZIP file. Right now I am collecting data into text file. How can I redirect it directly to ZIP?
0
votes
1answer
1k views

moving files to a folder and zip the folder

I have to zip a few files induvidually from folder A and move them to folder B on the same directory which takes lot of time. So I thought of moving all those files to be zipped to a new folder(c), ...
8
votes
7answers
10k views

Extracting nested zip files

I have numerous zip archives, each of which contains a number of zip archives. What is the best way to recursively extract all files contained within this zip archive and its child zip archives, that ...
2
votes
1answer
678 views

How can I correctly decompress a ZIP archive of files with Hebrew names?

(Question self-migrated from superuser.com) Someone sent me a ZIP file containing files with Hebrew names (and created on Windows, not sure with which tool). I use LXDE on Debian Stretch. The Gnome ...
1
vote
1answer
107 views

Command to verify CRC (CRC32) hashes recursively

With the commands md5sum, sha1sum, sha256sum I can take a text file having an hash and a path per line and verify the entire list of files in a single command, like sha1sum -c mydir.txt. (Said text ...
8
votes
1answer
2k views

When I use zip, how can I display the overall progress without flooding the command line?

A fixed-length progress bar, a file or byte count, or better yet a timer showing the estimated time remaining would be ideal. zip's standard behavior seems to be to print a line for every file ...
3
votes
1answer
443 views

Can I uncompress a zip file containing a disk image and then save that to an SD card all in one step?

I am under the following restrictions: I have a 1.0 GB .zip file on my computer which contains one file, a disk image of raspbian. When uncompressed, this file is 3.2 GB large and named ...
1
vote
1answer
50 views

Zip subdirectories based on find, -exec

Here's what I would like to achieve: I have some directories, and subdirectories in them (which may have sub-subdirectories). In each subdirectory I want a zip file with contents of that particular ...
1
vote
1answer
179 views

Zip a file without including the parent directory

I have a folder that contains multiple files folder artifact1.app artifact2.ext2 artifact3.ext3 ... My goal is to zip the file from outside this folder (so without using cd ...
2
votes
2answers
70 views

Extract a List of .zip files into one new directory each, directory name to be taken from name of the zip file

I have a folder containing many .zip files. They are named like this: John-Rupert A. Doe_nnnnnnn_assignsubmission_file_*.zip where n is a digit, * is a string and John-Rupert A. Doe is a string ...
1
vote
0answers
48 views

Archive for root file system with quick random access

I need file archive format with the following features It is compressed (not plain tar or iso). It can backup (and restore) linux root file system keeping owners, symlinks, sparse files, devices, ...
3
votes
1answer
101 views

Listing the files from the nested zip file without extracing

I have nested zip files and i need to list the file names without extracting in the temp location. Using shell script. Please let me know if we have any work around Expample : Zip1 text1 ...
0
votes
1answer
377 views

why would you tar a zip file

I see here that a tar is used to merge several files into one. So why do I see so often one zip file in a tar? example : archive.zip.tar
4
votes
1answer
8k views

unzip to a specific folder

I want to unzip the contents of a zipfile called mine.zip into /yours/ but when I do it using the -d flag it keeps going into /yours/crap/ etc which is not I want Is there a way to do this?
1
vote
1answer
45 views

Zip several soundfile-formats without deflate

I have a folder that i want to zip but not deflate the soundfiles (since i'll create an expansion file for android). TO achieve that one can use the -n flag. that is zip -n .mp3 main_expansion ...
31
votes
5answers
74k views

How to unzip a multipart (spanned) ZIP on Linux?

I need to upload a 400mb file to my web server, but I'm limited to 200mb uploads. My host suggested I use a spanned archive, which I've never done on Linux. I created a test in its own folder, ...
1
vote
0answers
107 views

Ubuntu unzip error: sysmalloc assertion failed

I'm trying to unzip a multipart zip file (that I had originally zipped in Windows using WinRAR). The file consists of 4 parts: me.zip and me.z01, me.z02, me.z03 and me.z04. The command I'm using to ...
0
votes
1answer
383 views

bash: /usr/bin/find: Argument list too long

I have too many files in a folder. I just want my inodes to be get free as soon as possible,So I have tried with find ./EcoBackup/* -name '*.*' > FilesBackupName.txt bash: /usr/bin/find: Argument ...
2
votes
5answers
248 views

Extract a single file from a zip file only knowing the extension

My first part of the requirement: I would like to extract a single file from ex1234.zip. The structure and contents of ex1234.zip: ex1234 (directory) directory1 ex1234 (directory) ...