Questions tagged [gzip]

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

238 questions
217
votes
6 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
  • 17,227
  • 43
  • 116
  • 141
173
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,263
  • 12
  • 32
  • 30
151
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,323
  • 39
  • 89
  • 112
145
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
  • 2,885
  • 11
  • 33
  • 40
113
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
  • 3,977
  • 18
  • 51
  • 63
106
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,601
  • 3
  • 15
  • 12
104
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,263
  • 12
  • 32
  • 30
95
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,063
  • 2
  • 8
  • 5
88
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,023
  • 2
  • 9
  • 8
84
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,440
  • 2
  • 13
  • 25
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,311
  • 6
  • 32
  • 48
73
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,663
  • 46
  • 140
  • 214
69
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
  • 920
  • 1
  • 7
  • 11
62
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,792
  • 11
  • 46
  • 60
53
votes
4 answers

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 seem to be using a single CPU at approximately…
Floris
  • 1,159
  • 1
  • 7
  • 15
1
2 3
15 16