Linux under the Tar xvzf is decompression tar.gz, the equivalent gzip-d File.gz+tar vxf File.tar, as well as other decompression methods Daquan __linux

Source: Internet
Author: User
Tags bz2 uncompress
The most common packaging program under Linux is tar, and the packages we use in the TAR program are often referred to as the TAR packets, and the TAR package file commands are usually ended with. Tar. After the tar package is generated, you can use other programs to enter
Line is compressed, so let's start with the basic usage of the TAR command:
There are many options for the tar command (which can be viewed with man tar), but there are a few options that are commonly used, below
To illustrate:
# TAR-CF All.tar *.jpg
This command is to make all. jpg files into a package named All.tar. -C is to indicate the creation of a new package
,-f Specifies the file name of the package.
# TAR-RF All.tar *.gif
This command adds all the. gif files to the All.tar package. -R is the file that adds the
Mean.
# Tar-uf All.tar logo.gif
This command updates the logo.gif file in the original tar package All.tar, and-U is the meaning of the update file.

# TAR-TF All.tar
This command lists all the files in the All.tar package----------T is the list of files
# TAR-XF All.tar
This command is to solve all the files in the All.tar package------X is the meaning of the undo
The above is the most basic use of tar. In order to facilitate the packaging and unpacking of the user can be compressed or decompression
File, Tar provides a special feature. This is where tar can call other presses while packing or unpack.
Shrink programs, such as calling Gzip, bzip2, and so on.
1) Tar call gzip
Gzip is a compression program developed by the GNU organization. The file at the end of GZ is the result of gzip compression. With gzip
The relative decompression program is gunzip. Use the-Z parameter in tar to invoke gzip. Here are some examples to illustrate

# TAR-CZF All.tar. GZ *.jpg
The command is to make all. jpg files into a tar package, and use gzip compression to generate a
GZIP-Compressed package named All.tar. Gz
# TAR-XZF All.tar. Gz
This command is to untie the packets generated above.
2) Tar call bzip2
BZIP2 is a more compressed program,. bz2 end of the file is the result of bzip2 compression.
The bzip2 relative to the decompression program is BUNZIP2. Use-j this parameter in tar to invoke gzip. Here's an example.
Explain:
# TAR-CJF all.tar.bz2 *.jpg
The command is to make all. jpg files into a tar package and compress them with bzip2 to generate a
BZIP2 Compressed package named all.tar.bz2
# TAR-XJF ALL.TAR.BZ2
This command is to untie the packets generated above.
3) Tar call compress
Compress is also a compression program, but it seems that people who use compress are not as good as gzip and bzip2.
Many.. The file at the end of Z is the result of bzip2 compression. The decompression program relative to compress is uncompress
。 Use the-Z parameter in tar to invoke compress. Here are a few examples to illustrate:
# TAR-CZF All.tar.z *.jpg
The command is to make all. jpg files into a tar package and compress them with compress to generate
A uncompress compressed package named All.tar.z
# TAR-XZF All.tar.z
This command is to unlock the resulting package.

With the above knowledge, you should be able to unlock a variety of compressed files, the following for the TAR series of compressed text
Pieces to make a summary:
1 for. Tar End of File
TAR-XF All.tar
2) for. Files at the end of GZ
Gzip-d all. Gz
Gunzip all. Gz
3) for. tgz or. Tar. Files at the end of GZ
Tar-xzf All.tar. Gz
Tar-xzf all.tgz
4 for. bz2 End of File
Bzip2-d all.bz2
BUNZIP2 all.bz2
5) For tar.bz2 end of file
TAR-XJF all.tar.bz2
6) for. File at the end of Z
Uncompress all. Z
7 for. Tar.z End of File
Tar-xzf All.tar.z

In addition to the common compressed files under Windows. zip and. Rar,linux also have a corresponding method to extract it
Children
1) for. zip
Related Article

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.