Compression and decompression methods for many compressed files such as tar gz bz2 tgz Z

Source: Internet
Author: User
Tags bz2 rar rar extension uncompress unzip rar

The most common packaging program under Linux is tar, which is often referred to as the TAR package, and the tar package file commands are usually terminated with. Tar. After the tar package is generated, it can be compressed with other programs, so first of all, the basic usage of the TAR command: There are many options for the tar command (you can see it in Man tar), but there are a few options that are commonly used, as illustrated below: #Tar-CF all.Tar*the. jpg command is to make all. jpg files into a package named All.tar. -c is to represent the generation of new packages,-f Specifies the file name of the package. # Tar-RF all.Tar*the. gif command is to add all. gif files to the All.tar package. -R is meant to increase the file. # Tar-uf all.Tarlogo.gif This command updates the logo.gif file in the original tar package All.tar,-U is the meaning of the update file. # Tar-TF all.TarThis command lists all the files in the All.tar package,-T is to list the meaning of the file #Tar-XF all.TarThis command is to solve all the files in the All.tar package,-x is the most basic use of tar, which is the meaning of the undo. Tar provides a special feature to facilitate the user's ability to compress or decompress a file while unpacking the package.   This is what tar can call other compression programs while packaging or unpacking, such as calling Gzip, bzip2, and so on. 1) Tar call gzip gzip is a compression program developed by the GNU organization, and the. Gz end file is the result of gzip compression. The decompression procedure relative to Gzip is gunzip. Used in tar-Z This parameter to call gzip. Here's an example: #Tar-czf all.Tar. GZ *the. jpg command is to make all. jpg files into a tar package and compress them in gzip to generate a gzip-compressed package named All.Tar. GZ #Tar-xzf all.TarThe . GZ command unlocks the package generated above. 2The tar call bzip2 bzip2 is a more compressible compression program, and the. bz2 end of the file is the result of bzip2 compression. The decompression procedure relative to bzip2 is bunzip2. Used in tar-J This parameter to call gzip. Here's an example: #Tar-CJF all.Tar. bz2 *the. jpg 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 unlocks the package generated above. 3tar call compress compress is also a compression program, but it seems that people who use compress are not as good as gzip and bzip2. The file at the end of Z is the result of bzip2 compression. The decompression procedure relative to compress is uncompress. Used in tar-Z This parameter to call compress. Here's an example: #Tar-czf all.Tar. Zthe. jpg 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 solve the above-generated package with the above knowledge, you should be able to solve a variety of compressed files, the following for the TAR series of compressed files to make a summary:1) for files ending in. TarTar-XF all.Tar     2) for files ending with. GZgzip-D all.gzGunzipall.gz3) for. Tgz or.Tarfiles ending in. gzTar-xzf all.Tar. GZTar-Xzf all.tgz4) for files ending with. bz2bzip2-D all.bz2bunzip2all.bz25) for files ending with tar.bz2Tar-XJF all.Tar. bz26) for. Z End of File uncompress all. Z7For.Tar. Z End of FileTar-xzf all.Tar. Z also for common compressed files under window, zip and. Rar,linux have the appropriate methods to decompress them:1For.ZipLinux provides a zip and unzip program, ZIP is a compression program, unzip is the decompression program. They have a lot of parameter options, here is a brief introduction, still give an example of its usage: #ZipAll.Zip*the. jpg command is to compress all. jpg files into a zip package #UnzipAll.ZipThis command is to extract all the files in the All.zip.2for. rar to process. rar files under Linux, you need to install RAR forLinux can be downloaded from the Web, but remember that the RAR forLinux is not free; available from http://www.rarsoft.com/download.htm Download Rarfor Linux 3.2.0, and then install: #Tar-XZPVF rarlinux-3.2.0.Tar. GZ # cd RAR # Makethis installs well, after installation has RAR and unrar these two programs, RAR is the compression program, Unrar is the decompression program. They have a lot of parameter options, here is a brief introduction, still illustrate its usage: # rar a All*the. jpg command is to compress all. jpg files into a RAR package named All.rar, which will automatically append the. rar extension to the package name. # Unrar e all.rar This command is to extract all the files in the All.rar to this, we have introduced the tar under Linux,gzip、Gunzip、bzip2、bunzip2, Compress, uncompress,Zip、Unzip, RAR, Unrar, and so on, you should already be able to use them.Tar,. GZ,.Tar. GZ,. tgz,. bz2,.Tar. bz2,. Z.Tar. Z.Zip,. rar 10 kinds of compressed files to extract, you should not need to download a software and do not know how to solve Linux under the trouble.   And the above methods are basically effective for UNIX. This article describes the compression programs under Linux, tar,gzip、Gunzip、bzip2、bunzip2, Compress, uncompress,Zip、Unzip, RAR, Unrar, and how to use them.Tar,. GZ,.Tar. GZ,. tgz,. bz2,.Tar. bz2,. Z.Tar. Z.Zip,. rar 10 kinds of compressed files to operate. The following additionsTar-C: Create a compressed archive-x: Unzip-T: View content-r: Append files to the end of the compressed archive file-u: Update the files in the original package these five are stand-alone commands that use one of the compression decompression, and can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed. -Z: With the gzip attribute-J: With the bz2 attribute-Z: With the Compress attribute-V: Show All procedures-O: Unpack the file to the parameters below the standard output-F is a must.-F: Use the file name, remember that this parameter is the last parameter, can only be followed by the file name. # Tar-CF all.Tar*.jpg This command is to make all. jpg files into a package called All.tar. -C is a means of generating a new package,-f Specifies the file name of the package. # Tar-RF all.Tar*the. gif command is to add all. gif files to the All.tar package. -R is meant to increase the file. # Tar-uf all.Tarlogo.gif This command updates the logo.gif file in the original tar package All.tar,-U is the meaning of the update file. # Tar-TF all.TarThis command lists all the files in the All.tar package,-T is to list the meaning of the file #Tar-XF all.TarThis command is to solve all the files in the All.tar package,-x is the meaning of the untie compressionTar–CVF jpg.Tar*.jpg//package All JPG files in the directory into Tar.jpgTar–czf jpg.Tar. GZ *.jpg//after packaging all the JPG files in the directory into Jpg.tar and compressing them in gzip, generate a gzip-compressed package named Jpg.tar.gzTar–CJF jpg.Tar. bz2 *.jpg//after packaging all the JPG files in the directory into Jpg.tar, and compressing them with bzip2, a bzip2 compressed package is generated, named jpg.tar.bz2Tar–czf jpg.Tar. Z *.jpg//after packaging all the JPG files in the directory into Jpg.tar, and compressing them with compress, a umcompress compressed package is generated, named Jpg.tar.zRAR a Jpg.rar *.jpg//rar format compression, need to download RAR for Linux firstZipJpg.Zip*.jpg//zip format compression, you need to download the zip for Linux firstUnzipTar–xvffile.Tar //Unzip the tar packageTar-xzvffile.Tar. gz//Decompression tar.gzTar-xjvffile.Tar. bz2//Decompression tar.bz2Tar–xzvffile.Tar. Z//unzip the tar. ZUnrar Efile. rar//unzip RARUnzip file.Zip //Unzip zipSummary1、*.TarUseTar–XVF Decompression2, *.gz withgzip-D or Gunzip decompression3、*.Tar. GZ and *.tgzTar–XZF Decompression4, *.bz2 withbzip2-D or unzip with BUNZIP2 .5、*.Tar. bz2 Extract with Tar–xjf6、*. Z Extract with Uncompress7、*.Tar. Z Extract with Tar–xzf8、*. rar with Unrar e decompression9、*.ZipUseUnzipExtract

Compression and decompression methods for many compressed files such as tar gz bz2 tgz Z

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.