Under Linux. tar.gz and. gz File Decompression Detailed __linux

Source: Internet
Author: User
Tags gz file

. tar.gz and. gz files are two different files that need to be treated differently, and of course the decompression commands are different, so let's share their respective decompression methods.


1.. tar.gz file, which is a compressed file of the tar file, can be decompressed using the tar command .

For example:


Decompression: Tar zxvf pythontab.tar.gz


Extract files to the specified folder: Tar xzvf fenci.py.tar.gz-c pythontab/


2. The simple. gz file decompression, this file can not use the TAR command decompression, need to use Gunzip decompression, using the command gzip


Decompression: Gzip-b pythontab.gz


But note: gzip appears to be unable to set the extract to the specified directory, can only extract to the current directory.


Extract the simple. gz file Method Two:


Use the Zcat command, and then save the standard output to a file.


For example:


Zcat pythontab.gz > pythontab.py


Of course this solution understands the need to press to a specified directory.


Zcat pythontab.gz >/home/test/aa/pythontab.py


The above is under Linux. tar.gz and. gz File Decompression


Pythontab Net original article, please specify the source

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.