YouTube Icon

Code Playground.

How to Unzip (Open) Gz File

CFG

How to Unzip (Open) Gz File

Gzip is a well known pressure calculation that diminishes the size of a document while keeping the first record mode, proprietorship, and timestamp. This calculation is frequently used to pack web components for quicker page stacking. 

By show, a document packed with gzip closes with either .gz or .z. 

This article discloses how to open (or unfasten) .gz records. 

Also Read:-How to upload and Extract Zip file in CodeIgniter

Unzipping gz File

On Linux and macOS, you can decompress a .gz record utilizing the gzip utility. The linguistic structure is as per the following: 

gzip -d file.gz

The order will reestablish the compacted record to its unique state and eliminate the .gz document. 

Also Read:-Create and Download Zip file in CodeIgniter

To keep the packed document pass the - k alternative to the order: 

gzip -dk file.gz

Another order that you can use to decompress a .gz record is gunzip This order is essentially a false name to document with gzip - d. 

To open a .gz record with gunzip essentially pass the document name to the order: 

gunzip file.gz

In case you're on a work area climate and the order line isn't your thing, you can utilize your File director. To open (unfasten) a .gz record, right-click on the document you need to decompress and choose "Concentrate". 

Windows clients need to introduce extra programming, for example, 7zip to open .gz records. 

Also Read:-Call Model method from another Model in CodeIgniter

Removing tar.gz File 

Gzip calculation is intended to pack just a solitary record. Records that end in .tar.gz are .tar chronicles packed with gzip. 

To remove a tar.gz record , use tar order with the - xf choices followed by the compacted document name: 

tar -xf archive.tar.gz

The order will auto-identify the pressure type and will remove the chronicle in the current working index . 

Also Read:-Codeigniter 3 create zip file and download example

Conclusion

To decompress a .gz document, utilize the gunzip order followed by the record name. 

On the off chance that you have any inquiries, if it's not too much trouble leave a remark beneath.




CFG