Site: US UK AU |

How to decompress files in gzip

How to decompress files in gzip

This article explains how to use the Linux or UNIX command line to decompress gzip files.

Method for .gz files

Use the following procedure to decompress gzip files from the command line:

  1. Use SSH to connect to your server.

  2. Enter one of the following:

    gunzip file.gz


    gzip -d file.gz
  1. To see the decompressed file, enter: 

    ls -1

Method for tar.gz and .tgz files

Files with the extension tar.gz or .tgz represent tar files compressed with gzip. Observe the following procedure to decompress these files from the Linux command line:

Use SSH to connect to your server.

For tar.gz files, enter:

gunzip < file.tar.gz | tar xvf -

For .tgz files, enter:

gunzip < file.tgz | tar xvf -

If you use the GNU operating system also known as GNU Tar, use one of the following commands, depending on whether the file uses the tar.gz or .tgz extension:

tar xvzf file.tar.gz
tar xvzf file.tgz


For 24-hour assistance any day of the year, contact our Support Team by email or through the Client Portal.

Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
What is GeoIP?
Added on Fri, Oct 31, 2014
How to request and revoke facility access (MEL, TMR)
Added on Wed, Feb 28, 2018
What is the DMCA?
Added on Mon, Dec 29, 2014
Colocation Access Card Request Form
Added on Tue, Oct 6, 2015
How to flush Memcached
Added on Mon, Apr 30, 2018
What are the benefits of dedicated IP addresses?
Added on Thu, Jan 14, 2016
How to flush Redis
Added on Thu, Apr 7, 2016
What is Git?
Added on Mon, Sep 15, 2014
How to transfer domains
Added on Wed, Nov 23, 2016
How to change SSH passwords from the CLI
Added on Thu, Feb 8, 2018