Introduction to Linux Decompression commands and decompression commands use _unix Linux

Source: Internet
Author: User
Tags bz2 pack rar
A brief introduction of the decompression command
Tar command
-C: Set up compressed files
-X: Decompression
-T: viewing content
-R: Appending files to the end of a compressed archive
-U: Updating files in original compressed package
These five are independent commands, compression decompression to use one of them, can be used with other commands but only one. The following parameters are optional when compressing or decompressing files as needed.
-Z: With gzip properties
-j: With bz2 properties
-Z: With compress properties
-V: Show All procedures
-O: Unlocking files to standard output
The following parameter-F is required
-F: Use the file name, remember, this parameter is the last parameter, only the file name can be followed.
# TAR-CF All.tar *.jpg This command is to be all. JPG file into a package called All.tar. -C indicates the creation of a new package,-f Specifies the file name of the package.
# TAR-RF All.tar *.gif This command is to be all. The GIF file was added to the All.tar bag. -R means to add a file.
# tar-uf All.tar logo.gif The command is to update the Logo.gif file in the original tar package All.tar,--------to represent the update file.
# TAR-TF All.tar This command lists all the files in the All.tar package,----------T is the name of the file
# tar-xf All.tar This command is to solve all the files in the All.tar package, X is the meaning of the undo
second, the use of compression command
TAR–CVF Jpg.tar *.jpg//pack all JPG files in the directory into TAR.JPGTAR–CZF jpg.tar.gz *.JPGTAR–CJF jpg.tar.bz2 *.jpg
After packaging all the JPG files in the directory into Jpg.tar and using gzip compression, generate a gzip compressed package, named jpg.tar.gz

After packaging all the JPG files in the directory into Jpg.tar and compressing them with bzip2, generate a bzip2 compressed package named Jpg.tar.bz2tar–czf jpg.tar.z *.jpgrar a jpg.rar *.jpg
After packaging all the JPG files in the directory into Jpg.tar and compressing them with compress, generate a umcompress compressed package named Jpg.tar.z

RAR format compression, you need to first download rar for Linuxzip jpg.zip *.jpg
Zip format compression, you need to first download zip for Linux
Three, decompression command use
TAR–XVF File.tar//Unzip the tar pack TAR-XZVF file.tar.gz//extract TAR.GZTAR-XJVF file.tar.bz2//extract TAR.BZ2TAR–XZVF File.tar.z//Extract Tar . Zunrar e file.rar//decompression Rarunzip file.zip//Unzip Zip IV, Summary
1, *.tar with TAR–XVF decompression
2, *.gz with gzip-d or gunzip decompression
3, *.tar.gz and *.tgz with TAR–XZF decompression
4, *.bz2 with bzip2-d or with BUNZIP2 decompression
5, *.tar.bz2 with TAR–XJF decompression
6, *. Z with uncompress decompression
7, *.tar. Z with TAR–XZF decompression
8, *.rar with Unrar e decompression
9, *.zip with unzip decompression
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.