Linux compression commands

Source: Internet
Author: User
Tags bz2 rar

Description of the TAR compression decompression command under Linux tar-c: Building a compressed archive-x: extracting-T: viewing Content-r: Appending files to the end of a compressed archive-u: Update the files in the original package this five is a separate command, the compression decompression will use one of them, Can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed. -Z:-j with gzip properties:-Z with bz2 attribute:-V with compress attribute: Show all procedure-O: Unpack the file to standard output The parameter-F is required-F: Use the file name, remember that this parameter is the last parameter, only the file name can be followed. # TAR-CF All.tar *.jpg This command is to make all. jpg files into a package called All.tar. -C is the file name that represents the generation of a new package,-f specifies the package. # TAR-RF All.tar *.gif This command is to add all the. gif files to the All.tar package. -R is meant to increase the file. # tar-uf All.tar logo.gif This command is to update the original tar package All.tar in the logo.gif file,-U is the meaning of the update file. # TAR-TF All.tar This command is to list all the files in the All.tar package,-T is to list the meaning of the file # tar-xf All.tar This command is to solve all the files in the All.tar package,-T is to untie the meaning of compression tar-cvf Jpg.tar *.jpg/ /package all JPG files in the directory into tar.jpg tar-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, generate a bzip2 compressed package 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, generating a umcompress compressed package named Jpg.tar.Zrar a jpg.rar *.jpg//rar format compression, you need to download the RAR for Linuxzip jpg.zip *.jpg//zip format compression, you need to download the zip for Linux decompression tar-xvf File.tar first/Unzip tar package TAR-XZVF file.tar.gz//Unzip TAR.GZTAR-XJVF file.tar.bz2//Unzip TAR.BZ2TAR-XZVF FILE.TAR.Z//Unzip tar. Zunrar e file.rar//decompression Rarunzip file.zip//Decompression Zip Summary 1, *.tar with TAR-XVF decompression 2, *.gz with gzip-d or Gunzip decompression 3, *.tar.gz and *.tgz with Tar-x ZF Decompression 4, *.bz2 with bzip2-d or BUNZIP2 decompression 5, *.tar.bz2 with TAR-XJF decompression 6, *. Z Extract 7, *.tar with Uncompress. Z with TAR-XZF decompression 8, *.rar with Unrar e decompression 9, *.zip with unzip decompression

Linux compression commands

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.