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
How to clear your browser cache
Added on Mon, Aug 20, 2018
What is the DMCA?
Added on Mon, Feb 11, 2019
What is Git?
Added on Mon, Sep 15, 2014
How do I get sudo access to my Nexcess server?
Added on Wed, Feb 6, 2019
Colocation Access Card Request Form
Added on Tue, Oct 6, 2015
Facility Access Policy (OTR)
Added on Mon, Jan 22, 2018
How to change SSH passwords from the CLI
Added on Thu, Feb 8, 2018
How to flush Memcached
Added on Mon, Apr 30, 2018
How to interpret MTR results
Added on Tue, Jun 26, 2018
Nexcess Product Life Cycle
Added on Tue, Feb 5, 2019