A data compression program. Originally a GNU utility it has been cloned by most Unix variants.

learn more… | top users | synonyms

6
votes
2answers
6k views

gzip - redirection or piping?

I will be backing up a large (750GB) disk to an external USB disk using dd. Should I be using redirection or piping? Which is more efficient? Or is there a difference? Also, what is the best block ...
2
votes
2answers
1k views

Gzip decompress on file with other extension?

Is it possible to use gzip to decompress a gzipped file, without the gz extension, and without moving the file?
0
votes
0answers
48 views

Backing up to DVD [duplicate]

Possible Duplicate: Splitting large directory tree into specified-size chunks? I have a partition that is about 14G and I need to back it up to DVD in such a way that I can use each disc to ...
4
votes
1answer
3k views

Will tar -cvzf packed.tar.gz mydir take hidden files into account?

I need to create a tarball of a given directory. However, I need to make sure hidden files are included too (such as those beginning with .). Will the following command automatically take the hidden ...
12
votes
2answers
2k views

Why does the gzip version of files produce a different md5 checksum

I have four files that I created using an svndump test.svn test2.svn test.svn.gz test2.svn.gz now when i run this md5sum test2.svn test.svn test.svn.gz test2.svn.gz Here is the output ...
1
vote
3answers
798 views

unzip a file from another folder

How can I unzip a file from another folder? gunzip -d /home/tomcat_dev/HN/radd/input.txt.gz unzips that file to the same folder. But if I want to bring it to my folder? When I do this: gunzip -d ...
0
votes
2answers
801 views

Combination of ls, xargs and zcat leads to duplicate file name suffixes?

Disclaimer: Yes, finding files in a script with ls is bad, but find can't sort by modification date. Using ls and xargs with echo everything is fine: $ ls -t1 ssl-access*.gz | xargs -n 1 echo ...
8
votes
4answers
10k views

How to uncompress zlib data in UNIX?

I have created zlib-compressed data in Python, like this: import zlib s = '...' z = zlib.compress(s) with open('/tmp/data', 'w') as f: f.write(z) (or one-liner in shell: echo -n '...' | python2 ...
6
votes
6answers
11k views

How can i view the contents of a tar.gz file (filenames + filesize)

I cannot use tar -tz as the solaris version I'm using does not accept the -z option. I tried something like gunzip file.tar.gz | tar -tv but that only gives: tar: /dev/rmt/0: No such file or ...
2
votes
2answers
5k views

How to recover a corrupted “tar.gz” file

I suddenly needed to recover an old tar.gz file, but as soon as I execute so: tar -zxvf filename.tar.gz I get this: gzip: stdin: invalid compressed data--format violated tar: Child returned ...
4
votes
2answers
771 views

diff a gzipped tarball against a directory?

Is there a way I can diff a gzipped tarball against an existing directory? I would like to be able to do it without extracting the data from the tarball.
2
votes
1answer
655 views

Recursively Gziping Files (and keep original files) & Gziping Text Input

I need Gzip to pre-zip some static files for a webserver I'm building. All of the files I need to gzip will be in a folder named .cache. Since some clients may not accept responses that are gzipped, I ...
8
votes
4answers
3k views

tar extraction depends on filename?

I often download tarballs with wget from sourceforge.net. The downloaded files then are named, e.g ...
19
votes
3answers
37k views

Add/update a file to an existing tar.gz archive?

Is there a way to add/update a file in a tar.gz archive? Basically, I have an archive which contains a file at /data/data/com.myapp.backup/./files/settings.txt and I'd like to pull that file from the ...
0
votes
1answer
45 views

Configure webserver for compression

Based on this page: http://code.google.com/speed/page-speed/docs/payload.html#GzipCompression I need to enable compression on my website, but I have no idea how to do this. If this is the right ...
5
votes
4answers
1k views

How can I check if a gzipped file is empty?

Is there a quick way to check if a gzipped file is empty, or do I have to unzip it first? example: $ touch foo $ if [ -s foo ]; then echo not empty; fi $ gzip foo $ if [ -s foo.gz ]; then echo not ...
2
votes
1answer
1k views

initramfs image compression other than gzip

can the initramfs image be compressed by a method other than gzip, such as lzma?