gzip (or GNU zip) is a file format and corresponding utility for compressing files using the DEFLATE algorithm. The usual extension is .gz.
Questions tagged [gzip]
245 questions
237
votes
7 answers
How to specify level of compression when using tar -zcvf?
I gzip directories very often at work. What I normally do is
tar -zcvf file.tar.gz /path/to/directory
Is there a way to specify the compression level here? I want to use the best compression possible even if it takes more time to compress.
Lazer
- 18,407
181
votes
7 answers
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 nothing that shows how to create and extract compressed…
morpheous
- 4,463
161
votes
7 answers
Pros and cons of bzip vs gzip?
I've known gzip for years, recently I saw bzip being used at work. Are they basically equivalent, or are there significant pros and cons to one of them over the other?
ripper234
- 11,903
156
votes
1 answer
How do I unzip a tar gz archive to a specific destination?
I want to unpack a .tar.gz file to a specific directory.
The archive file is in /root/Documents. I want to unzip it into /root/Desktop/folder. The folder structure in zipped file should be preserved in the destination directory.
alwbtc
- 3,085
- 13
- 35
- 43
120
votes
2 answers
How to list the contents of a zip along w/ file sizes and compression ratio via cmd line
How do I list the contents of a zip along w/ file sizes and compression ratio (or packed size) on osx w/ command line tools?
erikvold
- 4,148
113
votes
8 answers
tar: Exiting with failure status due to previous errors
I have written a little script that tars and compresses a list of directories + files.
The script appears to run succesfully, in that a useable .tar.gz file is created after the script runs.
However, I get this annoying message after the script…
morpheous
- 4,463
112
votes
4 answers
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 also compress.
Because I do not fully understand…
Mario Zigliotto
- 1,661
99
votes
6 answers
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 'gzip' it. Is this correct?
thndrkiss
- 1,133
97
votes
6 answers
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?
Tony
- 1,093
89
votes
4 answers
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 of=/remote/path/in/local/network/backup.img
which gave me a very low network transfer speed of…
Foo Bar
- 1,560
78
votes
3 answers
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?
yazz.com
- 3,361
76
votes
5 answers
gzip without tar? Why are they used together?
Why are tar and gzip almost always used together, and not just gzip? Is there any advantage to that method?
user541686
- 23,629
73
votes
2 answers
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 indication as to which of these (if any) was the…
Lily Finley
- 959
66
votes
7 answers
What is the maximum compression ratio of gzip?
What is the largest size a gzip (say 10kb for the sake of an example) can be decompressed to?
Zombies
- 3,972
63
votes
6 answers
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 uncompressed_name
-1223644243 1751372002 -75.3% …
user238010
- 631