`gzip` (or GNU zip) is a file format and corresponding utility for compressing files using the DEFLATE algorithm. The usual extension is `.gz`.

learn more… | top users | synonyms

0
votes
0answers
23 views

List contents of zip archive via stdin

Is there a "magic" way to list the contents of a Zip archive piped in via stdin? For instance: $ some_process_sending_files_in_one_zip_stream_to_stdout | gunzip -l - ... listing of files ... When ...
1
vote
1answer
18 views

How to revert a “gzip -r folder/” command?

I accidentally compressed all the files using the Gzip method which compresses all the files (not directories) individually, replacing the uncompressed files with the .gz compressed files. How can I ...
50
votes
2answers
2k views

Why is piping 'dd' through gzip so much faster than a direct copy?

I wanted to backup a path from a computer in my network to another computer in the same network over a 100 Mbit/s line. For this I did dd if=/local/path ...
0
votes
1answer
211 views

How to compress a large file to many smaller zip files with defined size?

I have a very large file, e.g. 100GB, and I want to compress it to many smaller zip file, with each file cannot larger than 1GB, what would be the most suitable commands to do it? remark: I want to ...
0
votes
0answers
33 views

GZIP corruption with big files?

I came across a weird behavior: gzip v1.5 - Fedora r18 A file -rwxrwxrwx. 1 root root 3892576256 Apr 28 11:29 vm.qcow2 Initial checksum: md5sum vm.qow2 954c5461468d68daed3cef6a7b66bd8f vm.qcow2 ...
1
vote
1answer
33 views

Need help in the shell script - gunzip and file command

This is on Ubuntu 12.04. I have a custom webkit based application where "browser" saves bunch of cache files. When triaging the problems, I have to inspect the cache. The cache directory holds many ...
3
votes
1answer
50 views

Why does tar with -z option create archive with different hash everytime

Can you tell me why tar czf archive.tar dir creates archive with different hash everytime (I check with 'md5sum') Without compression parameter -z or with parameter -j instead all works fine. ...
0
votes
1answer
32 views

Concatenate header of one file with tail of another

I have a large gzipped mysqldump file which contains some table definitions and then many insert statements. I'd like to edit the table definitions but leave the insert statements alone. The file is ...
0
votes
0answers
67 views

Error uncompressing file when piping curl to gunzip

I need to download a gzipped xml feed to parse in my Ruby app. It may well be quite large, 30Mb compressed, 300Mb uncompressed. So I do this: curl -s http://example.com/file.xml.gz | gunzip and read ...
0
votes
1answer
18 views

Copying Jar files into single zip file

I am trying to compress the hundreds of jar files into a single zip file that can be transferred to a different location. Please help.
0
votes
0answers
9 views

Maximum Gzip Output Increase

I am wondering what the maximum gzip output size is given an incompressible file. Basically, what is the worst case scenario for gzip? When an incompressible file is compressed with gzip, it grows ...
0
votes
1answer
25 views

Tar up only 3 specific files in command line with linux

Is it possible with one command to tar up 3 files into one tar archive? For example, tar up: public_html.tar.gz dbapp.sql dbwp.sql into a tar file called bak.tar.gz
1
vote
2answers
36 views

Search zipped *and* non-zipped files in one hit

I have a folder with a mix of zipped and unzipped log files which i want to search. I can search the non-zipped with grep -r "my-search-string" /path/to/folder and search the zipped files with ...
0
votes
1answer
42 views

dd a partition and keep device structure

How can I dd a partition while keeping its device structure? Source device: [root@cal-7-3 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 37.3G 0 disk └─sda1 8:1 0 ...
2
votes
2answers
81 views

Compressing compressed .tar.gz files deterministically

I want to perform a series of recompressions of compressed files to study their properties. At first, I tried simply recompressing .zip files in a loop: for f in $(seq 1 100) do zip $f.zip -9 -v ...
1
vote
1answer
88 views

How to convert a file of format tar.gz to tar.bz2?

Like the title says, how do I do this conversion from the Linux console?
0
votes
2answers
58 views

rsync: gzip on source tolerant

I need to transfer a couple of log-files each hour to a logstorage which all users can reach, and I use rsync for do that, but the problem comes when the log-file is rotated and automatically zipped, ...
0
votes
0answers
113 views

Caveats with gzip --rsyncable - no speedup

I am using (trying) gzip to compress an SQL file in an rsyncable way in order to transfer the backup with minimal delay. However it appears that this is not working, since the speedup is always 1.00. ...
0
votes
3answers
154 views

What are good compression algorithms for delta synchronization?

When syncing large files over a slow link, it is often useful to use delta compression in order to reduce the bandwidth used. It is also useful to compress files as they take up much less space. ...
0
votes
0answers
35 views

Gzip, firmware problems

I am trying to unpackage firmware. The file command gives me this. gzip compressed data, ASCII, has CRC, extra field gzip -d gzip.gz gives this. gzip: gzip.gz has flags 0xcf -- not supported Any ...
2
votes
1answer
1k views

How can I get the uncompressed size of gzip file without actually decompressing it?

Please find my OS details: $ uname -a AIX xxyy 1 6 000145364C00 I've tried the following command to get size of a file in gzip archive: $ gzip -l mycontent.DAT.Gz compressed uncompr. ratio ...
10
votes
3answers
1k views

Files with same content but with different md5sums when gzip'd?

I don't know why this is happening, but I upload some files to Amazon S3 then delete the sent files checking their md5sum both in Amazon and locally. But recently I found this issue about the same ...
1
vote
2answers
97 views

How to extract such a compressed file?

I have been asked to extract a ZIP file having in it 3 tar files and each tar file contains around 3000 gz files. I had to extract the main ZIP file first then extract the tar files second then ...
1
vote
1answer
274 views

Do curl and wget open gzipped files automatically?

I made two http calls to the same gzipped resource from two different machines - RHEL and OSX. curl http://example.com/file.gz The first call returned an expected binary output: /�IQ���} The ...
-2
votes
4answers
87 views

“.gz” extension somehow appended itself to EVERY FILE on my site… how do I undo it?

Somehow I accidentally appended the extension .gz to ALL files in my entire website directory. How do I undo this? I need them to retain their original file extensions (EG: picture.jpg.gz -> ...
4
votes
1answer
1k views

Why is gzip slow despite CPU and hard drive performance not being maxed out?

I have some JSON files, 20 GB each, that I want to compress with gzip: gzip file1.json This takes up one full CPU core, all fine. It processes around 25 MB/s (checked in atop), my hard drive can ...
4
votes
2answers
3k views

Time to zip very large (100G) files

I find myself having to compress a number of very large files (80-ish GB), and I am surprised at the (lack of) speed my system is exhibiting. I get about 500 MB / min conversion speed; using top, I ...
0
votes
2answers
405 views

What is the difference in various commands for compressing files in linux?

What are the commands for compressing files in linux and what are the difference between them? (for example: tar, gzip, rar). I'm working on Linux Mint 11 and doing a script for compressing files. I ...
3
votes
2answers
3k views

Is there a way to force gzip not to overwrite files on conflict?

I'm writing a script in which I'm gzipping files. There's a possibility that I might zip a file, create a file of the same name, and try to gzip this as well, e.g. $ ls -l archive/ total 4 ...
1
vote
1answer
2k views

Between xz, gzip, and bzip2, which compression algorithim is the most efficient?

Between xz, gzip, and bzip2, which compression algorithm gives the smallest file size and fastest speed when compressing fairly large tarballs?
2
votes
2answers
2k views

gzip several files in different directories and copy to new directory

I'm working with several files that are located in different directories that I need to compress into individual .gz files. I also need to move the compressed files to a single directory while leaving ...
0
votes
3answers
381 views

What is the equivalent unix command to a Mac OSX “Compress” menu action?

When I right-click a file in Mac OSX and select "Compress 'File Name'", what is the equivalent bash or terminal command to get the same result? Is it just gzip -9 /path/to/filename?
2
votes
2answers
4k views

.tgz file- tar: Unrecognized archive format

I'm trying to install a 10gen build of mongodb on my local mac running Mountain Lion (10.8.3): I fetch it with curl at: curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.tgz > ...
2
votes
1answer
486 views

Why is ZFS gzip-9 compression so much worse than actually using zip files?

I am working with some very large packet capture files (~150GB across 30 files) but because of how highly redundant packet captures are, these compress to ~7% (14.29x) of their originally file size ...
0
votes
1answer
34 views

Removind same *.tar.gz archives

I have crontab event archives to .tar.gz some folder every N hours. Finally I have collection of .tar.gz files. Now I want remove duplicating archives (created while target files stays unchanged) How ...
0
votes
0answers
28 views

Is there an older version of gzip that returns different/larger outputs?

I don't know how else to phrase this question, but I stumbled upon a file which I know from the header is gzipped (1F8B0800) but I am unable to recreate the file no matter what I try (including gzip ...
0
votes
1answer
603 views

One-click to create and extract .tar.gz files in Windows?

I'm using 7-zip latest alpha version (9.30) and I find it really inconvenient that, if I want to create a .tar.gz archive, I have to create a .tar archive first then add it to a .gz archive later. So ...
2
votes
1answer
2k views

Shell Script to GZIP files without overwrite .gz files

I'm trying to create a shell script which receive as first parameter of a path to a folder which I would like to compress all files using gzip without overwrite the .gz files that already exist in ...
0
votes
1answer
118 views

gzip many files one by one

I have 100 files, n1.txt, n2.txt,… and I want to gzip each of them, but not in one file – finally I'd like to have 100 n*.txt.gz files. How can I do that in Linux with Bash?
0
votes
1answer
488 views

zcat or gunzip: proceed on error

When trying to gunzip or zcat a large number of gzip files, zcat/gunzip will terminate with this error: gzip: <gzip-file>: unexpected end of file Is there any way I can get gunzip or zcat to ...
7
votes
1answer
5k views

When using “gzip --decompress”, the result is “gzip: MYFILE.zip: unknown suffix — ignored” on Windows

In Windows PowerShell (if it matters), I would like to decompress a zip file with gzip with the argument --decompress, but unfortunately it doesn't work. Please look at the screenshot below. gzip ...
1
vote
1answer
4k views

What command to use to unpack a .tar.gz file in Windows?

I use to receive tar.gz files fromm colleagues but unpacking them with 7zip is not convenient as it unpacks a tar file from gz first while I usually seek to get the tar file contents (so I have to ...
2
votes
2answers
1k views

Find out the size of a .tar.gz archive in the terminal without unpacking

I have a 32GB .tar.gz archive and I'd like to know the size of the files if I unpack this compressed archive. I'd like to avoid unpacking the archive first and than use e.g. du. Is it also possible ...
2
votes
1answer
170 views

UNIX shell command to expand files of any compressed type

Is there any UNIX shell command to expand a compressed file which type is not known in advance? I should be able to use this command to expand at least any of the following types of files, though the ...
0
votes
1answer
399 views

pfSense iso.gz doesn't seem to be a compressed iso image

I downloaded the latest pfSense ISO (pfSense-2.0.1-RELEASE-i386.iso.gz) and had 7zip extract it, but it just shows me the disk contents. I cannot extract the actual ISO file to burn it with the boot ...
0
votes
1answer
306 views

Compressing bigger than 1GB files seems not to work

I tried my best to compress some videos, about 1.4GB each. I tried to compress them separately, "tarring" (using tar) them and then compress, everything. I'm on OS X Lion and I did try the ...
8
votes
4answers
9k views

How to obtain maximum compression with .tar.gz?

The way i understand the use of tar + gzip is that tar is normally used to consolidate a grouping of files into a single file, then gzip is used to compress that file. I recently learned that tar can ...
0
votes
1answer
289 views

How to zgrep by file pattern and timestamp?

I have a list of several thousand gzip (*.gz) files that I'd like to zgrep through, but I only want to run it on files with a last-modified-timestamp on or after yesterday (11/22/2012) and that ...
0
votes
2answers
78 views

Extract a section of a tgz file

I have a 28.5 GB .tgz file which was created on the command line of a Linux computer, compressing one folder and all its many many subfolders. I now want to extract a single sub-sub folder from that ...
0
votes
2answers
818 views

Estimate compressed file size in tar.gz

I've got a set of .tar.gz files, which are duplicity backup files (either full backups or incremental ones). I'd like to compute which directories take the most space on backups. This will most ...