How to Gzip File Compression in Unix

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.

Instructions

    • 1

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

    • 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

      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

      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

      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.

Related Searches:

Comments

You May Also Like

  • How to Unzip TGZ Files

    A TGZ file is a file archive in TAR (tape archive) file format that has been compressed by the gzip (GNU Zip)...

  • How to Unzip a GZ File in Unix

    Unix systems support a large number of file compression utilities that vary in the extent of compression provided. The Gzip utility creates...

  • How to Compress Files in Unix

    The Unix operating system has multiple commands for file compression. Three of the commands are "compress," "pack" and "gzip." The "compress" and...

  • How to Unzip Gzip Files

    Gzip is a patent-free software application that compresses files into a container format. Unlike the Zip and 7Zip formats, Gzip is not...

  • How to Compress Files With Gzip

    Program executables, user documents and multimedia files can grow too big for convenient handling even with modern hard drives and flash storage...

  • How to Identify Different Types of Compression Methods in UNIX

    There are a few different types of compression methods in UNIX. This article will show the basic types and how to work...

  • How to Encrypt a File in Unix

    There will be times, as an avid Unix user, that you will want to encrypt a file. A versatile encryption program comes...

  • How to Unzip GZ Files in Windows

    Gzip stands for GNU zip. The utility was writtel to be distributed freely with full source code by Jeal-loup Gailly and Mark...

  • EMZ File Types

    EMZ File Types. The EMZ file is a Windows compressed enhanced metafile. This type of file is used by programs such as...

  • How to Allow GZIP in GoDaddy

    As webpages add more features, they can take longer to download on certain browsers. GoDaddy hosting services allow users to compress their...

Related Ads

Featured