eHow launches Android app: Get the best of eHow on the go.

How To

How to Gzip File Compression in Unix

Contributor
By eHow Contributing Writer
(5 Ratings)

Gzip is a Unix utility program to compress files. Files compressed using Gzip are replaced by a smaller file with the same name and a suffix indicating it is a Gzip file. Gzip possess a number of functional options. For example, instead of compressing to a new file, the output of Gzip may be directed to STDOUT to feed a Unix command pipe.

Difficulty: Moderate
Instructions
  1. Step 1

    Type ls -l in a Unix shell at the command prompt to identify the file or files you wish to compress

  2. Step 2

    Enter "gzip" and then a filename. The filename may include characters expanded by a shell such as ? or *. All selected files will be compressed individually.

  3. Step 3

    Key in ls -l to see the result. Compare the zipped file size to the original file and you will see the effect of Gzip.

  4. Step 4

    Use the -d option to uncompress Gzip files. To expand the file to its original size and filename use the command "gzip -d" followed by the filename.

  5. Step 5

    Type "zcat filename > newfile" to place a compressed file into a new file.

Tips & Warnings
  • Use the -r option to compress all files in the working directory and its child directories.
  • Gzip provide the option to run faster with less compression or slower with greater compression in ten steps.
  • Gzip is a Unix tool. Files zipped using Gzip cannot be unzipped in windows system by using popular tools like Winzip.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2010 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy .   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. † requires javascript

eHow Computers
eHow_eHow Technology and Electronics