`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
2answers
21 views

Decompress logged GZIP binary data

In an effort to verify my app was sending back and forth with my server correctly, I had run tcpdump -w ~/capture.txt -s 0 port 80 on a server with proxy sitting in between to capture all ...
3
votes
2answers
242 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 ...
2
votes
1answer
24 views

What is the correct MIME type for a tar.gz file?

What is the correct MIME type for a tar.gz file? I've searched around and found several values being used, including: application/x-gzip application/x-gtar application/x-tgz But I could find no ...
2
votes
3answers
3k views

gzip change file ownership

Here is a case I don’t understand. I have a group bar, and this group has two users; foo and bar. I have a test.txt file, foo is the owner and bar user only can read it. However, if bar user run ...
20
votes
6answers
49k views

Command to 'gzip' a folder?

I am new to Mac command prompt stuff. How do you create a gzip of a folder in Mac OS X? I was told by a few folks that if you want to create a gzip of a folder you should 'tar' it first and then ...
-2
votes
1answer
31 views

is there a gzip like tool with password protection for windows? [closed]

I want to encrypt some text files on a server that could be unencrypted on the fly when needed for searches (I would use it with cygwin). I was thinking of something like gzip and gunzip type of a a ...
0
votes
0answers
32 views

Need to create .tgz file in Windows

I need to create a .tgz file - NOT a tar.gz, a .tgz specifically - in Windows. I've tried 7zip, Peazip, and ProgramArchiver, but they all create .tar.gz files. I've also tried running 7z from the ...
0
votes
1answer
62 views

Cannot unzip xymon-4.3.18.tar.gz; “No such file or directory” error

I have a problem unzipping an archive. ubuntu:~% sudo gzip -dc xymon-4.3.18.tar.gz | tar xf - gzip: xymon-4.3.18.tar.gz: No such file or directory tar: This does not look like a tar archive tar: ...
0
votes
0answers
26 views

How to disable mod_deflate in a subdirectoy using htaccess

I have a site that mod_deflate and gzip breaks a script in a subdirectoy. I am on a shared host. Is it possible to use compression on the root level and disable it on a specific subdirectory using ...
0
votes
1answer
66 views

dd , pv , gzip and exclude directory, possible?

Is it possible to do the following: dd if=/dev/hdx | pv | gzip > /path/to/image.img\ --exclude=/temp --exclude=/lost+found --exclude=/proc --exclude=/path/to/image.img So I want to make a backup ...
3
votes
2answers
39 views

How to tell of a GZip file is still being written while being copied

I am getting a gzip file in a path. Input Folder Path: <server>/input_gate I want to check whether the GZIP file I am getting in this folder are valid? I have used the following command. It ...
24
votes
3answers
16k views

How to know if a site is gzipped?

I am accessing some web sites which are really really slow, and I would like to know if those sites are gzipped. Is there an easy way to find this out?
3
votes
2answers
74 views

Is Gzip supposed to honor original filename during decompress?

This question stems from a Crypto++ library question on Stack Overflow: How to add filename to archive if compressing using Gzip class?. Gzip, as specified in RFC 1952 has an optional field for the ...
9
votes
4answers
4k views

Is there a way to mount a file.tar.bz2 without extracting it onto the filesystem?

Is there a way to mount a file.tar.bz2 without extracting it onto the filesystem? I don't care if the mount is read only. Hopefully your answer will also apply to file.tar.gz. "mount" in this ...
1
vote
1answer
63 views

How to extract single file from large tar/tar.gz file

What I want to do is to extract a single file from a huge tar file, instead of extracting the whole tar. I am using RHEL 6.4 I Googled it and tried the following: tar --extract --file=some.tar ...
1
vote
0answers
17 views

canot restore disk image with dd (target part filled with zero)

I have a RAID0 disk before, now I want change the size of it. From the manual, the only way is backup data, delete RAID, re-create with new size, and restore data. now I have many old 2.5" hdd, each ...
10
votes
4answers
18k views

How to obtain maximum compression with .tar.gz? [duplicate]

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 ...
55
votes
5answers
64k views

How to password protect gzip files on the command line?

I want to create some tar.gz (and possibly tar.bz2) files, using the tar command on Ubuntu 10.04. I want to password protect the file. What is the command to do this (I have Googled, but found ...
3
votes
3answers
4k 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?
7
votes
5answers
4k views

Which archiving method is better for compressing text files on Linux?

In my application I need do compress of logs that are text files. Seems that bzip2 and gzip have the same compression ratio. Is that correct?
3
votes
2answers
3k 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 ...
3
votes
1answer
199 views

Not sure gzip has decompressed the whole file

I am decompressing a list of files using gzip: At any time it skips from one file to the next, I read (I am using the verbose option): star_60out.txt.gz: 91.0% -- replaced with star_60out.txt or ...
1
vote
2answers
4k views

How to make sure a .tar.gz file is valid and will uncompress correctly?

I have a few BIG .tar.gz files, and I want to make sure they will uncompress, but without actually doing it. If the file opens on "Archive Manager" on Ubuntu, and I can view it contents there, does ...
0
votes
1answer
88 views

extracting multiple .gz files, and printing the name of the extracted file

I would think this is easy but I'm blocking… I have a directory with a series of log files (from minecraft server…): 2014-09-28-1.log.gz 2014-09-29-1.log.gz 2014-09-30-1.log.gz 2014-10-01-1.log.gz ...
4
votes
3answers
39k views

How do I gunzip a directory?

I have a gzipped directory called "new" which contains other directories and files, that I compressed in the following way gzip -cvr --no-name /path-to-directory/new > new.gz I have copied this ...
1
vote
2answers
92 views

Gzip thousands of files efficiently in a single pass

I want to gzip the contents of a couple of thousand of tiny files into a single file. While I could do it with something like for file in $(find . -iname 'pattern'); do; cat $file | gzip - >> ...
0
votes
1answer
37 views

can't open .gzip archives retrieved with wget

I'm trying to download the content of a directory hosted on a server using wget in a cygwin terminal. I have no problem getting the files but they are all .gz archive and once downloaded they are ...
10
votes
5answers
7k views

gzip all files without deleting them

I need to gzip all files in a dir separately including all files in sub-directories without deleting the originals afterwards. So let's say I have index.html, I want to have at the end index.html.gzip ...
4
votes
3answers
2k 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 ...
0
votes
1answer
44 views

how to extract lots of gz files in windows

I have 36,348 .gz files. I need to extract them all the same directory. In unix I would use gunzip and so forth from the shell. How would I do it on my windows 7 machine? I can't even get winrar to ...
0
votes
0answers
24 views

Is there any way to have the `split` utility gzip its output by default?

I'd like to be able to do something like, my_long_running_process_producing_lots_of_output | split --gzip --lines 1000000 - part_ and have this produce things like part_aa.gz part_ab.gz instead ...
2
votes
2answers
8k 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 ...
1
vote
1answer
160 views

Running find…exec tar czvf only archives one file…need all files

When attempting to run find . -iname "*.gz" -mtime +7 -exec tar czvf all_gizip_$(date +%Y-%m-%d).tar.gz {} \; I get the list of files ./corosync.log-20140620.gz ./corosync.log-20140618.gz ...
1
vote
2answers
626 views

Join with gzipped files

I want to use the command line join utility on two files. Unfortunately, they're gzipped. Because they're both gzipped, I can't use gzip -cd. Is there a slick way to do this without having to unzip ...
-2
votes
4answers
111 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 -> ...
0
votes
0answers
49 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 ...
54
votes
2answers
4k 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 ...
1
vote
1answer
40 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 ...
1
vote
4answers
7k views

How do I know the gzip compression level?

Given a gzip compressed file, how do I know what compression level (1-9) was used for it?
16
votes
4answers
6k views

Rsync friendly gzip

I must not be the only one - I'm rsyncing .tar.gz files and notice that every time the full file gets rsynced rather than the differences. Reading into it it seems back in 1999 someone created an ...
0
votes
1answer
797 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 ...
23
votes
4answers
65k views

How to gzip multiple files into one gz file?

I have 100 files: cvd1.txt cvd2.txt ... cvd100.txt How to gzip 100 files into one .gz file so that after I gunzip it, I should have cvd1.txt, cvd2.txt ... cvd100.txt separately? Thanks for your ...
0
votes
0answers
87 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
81 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
679 views

Google Chrome Developer Tools data transfer size

In Google Chrome when using the Network Panel to monitor files being transfered from a site, the total size of the data transfered is given at the bottom of the list. Does this figure reflect the size ...
3
votes
1answer
116 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
90 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 ...
5
votes
6answers
4k views

Converting gzip files to bzip2 efficiently

I have a bunch of gzip files that I have to convert to bzip2 every now and then. Currently, I'm using a shell script that simply 'gunzip's each file and then 'bzip2's it. Though this works, it takes a ...
0
votes
1answer
20 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
1answer
122 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