The use of various decompression files, such as the tar decompression GZ bz2

Source: Internet
Author: User
Tags gz file uncompress zip extension

Summarizes the compression and decompression methods of compressed packets in various formats under Linux. But some of the methods I did not use, but also not all, I hope you can help me to add, I will revise the perfect at any time, thank you!. Tar unpack: Tar xvf Filename.tar package: Tar cvf filename.tar DirName (Note: Tar is packaged, not is compression! ) ———————————————. GZ decompression 1:gunzip filename.gz decompression 2:gzip-d filename.gz compression: gzip FileName. tar.gz and. tgz Decompression: Tar ZXVF FileName.tar.gz compression: Tar zcvf FileName.tar.gz DirName ———————————————. bz2 extract 1:bzip2-d filename.bz2 extract 2:bun Zip2 filename.bz2 compression: bzip2-z FileName. tar.bz2 decompression: Tar jxvf FileName.tar.bz2 or tar--bzip xvf FileName.tar.bz 2 compression: Tar jcvf FileName.tar.bz2 DirName ———————————————  . BZDecompression 1:bzip2-d filename.bz decompression 2:bunzip2 filename.bz    Compression: Unknown   .tar.bz  decompression: Tar jxvf filename.tar.bz  compression: unknown   ———————————————  . z  Decompression: uncompress filename.z  compression: Compress filename . Tar. z  decompression: Tar zxvf filename.tar.z  compression: Tar zcvf filename.tar.z dirname  ———————————————   .zip  Decompression : Unzip filename.zip  compression: Zip filename.zip dirname  Compress a directory using the-r parameter,-R recursion. Example: $ zip-r filename.zip dirname  ———————————————   .rar  decompression: rar x filename.rar  compression: rar a FileName. RAR dirname    rar please go to: http://www.rarsoft.com/download.htm download!   After extracting, copy the rar_static to the/usr/bin directory (other directories specified by the $PATH environment variable):  [[email protected] tmp]# CP rar_static/usr/ bin/rar  ———————————————   .lha  decompression: lha-e filename.lha  compression: lha-a Filename.lha filename  &NB  Sp LHA please go to: http://www.infor.kanazawa-it.ac.jp/~ishii/lhaunix/download!   > After unpacking, copy the LHA to the/usr/bin directory (other directories specified by the $PATH environment variable):  [[email protected] tmp]# CP lha/usr/bin/ --—————————————   .rpm  unpacking: Rpm2cpio filename.rpm | cpio-div  ———————————————   .deb  unpacking: ar p filename.deb data.tar.gz | Tar zxf-  ———————————————  . Tar. tgz. tar.gz. Tar. Z. tar.bz. tar.bz2. zip. cpio. Arj. rar. Ace. Lha. Lzh. Lzx. Lzs., Arc. SDA. SFX. Lnx. Zoo. cab. Kar. cpt. P it. Sit .sea  decompression: Sex x filename.*  compression: Sex a filename.* filename    sex Just call the relevant program, itself does not compress, decompression function, please note!   Sex please go to: Http://sourceforge.net/projects/sex download!    After unpacking, copy the sEx to the/usr/bin directory (other directories specified by the $PATH environment variable):  [[email protected] tmp]# CP sex/usr/bin/ Common file decompression methods and commands   system under Linux · system    1. File with. A extension:  #tar XV file.a  2. A file with a. z extension is:  #uncompress. z  3. Files with the. gz extension:  #gunzip file.gz  4.:  files with. bz2 as extension #bunzip2 file.bz2  5. Files with the. tar.z extension: &NB  Sp #tar xvzf file.tar.z  or #compress-dc file.tar.z | Tar xvf  6. Files with the. tar.gz/.tgz extension:  #tar xvzf file.tar.gz   or GZIP-DC file.tar.gz | Tar xvf-  7. Files with the. tar.bz2 extension:  #tar xvif file.tar.bz2  or BZIP2-DC file.tar.bz2 | XVF-  8. Files with the. cpio.gz/.cgz extension:  #gzip-dc file.cgz | cpio-div  9. Files with the. cpio/cpio extension:  #cpio-div file.cpio  or CPIO-DIVC file.cpio  10. Install:  #rpm-I file with an. rpm extension .rpm  11. Extracting files with an. rpm extension:  #rpm2cpio file.rpm | cpio-div  12. File with. deb extension:  #dpkg-i file.deb  13. Extracting files with. deb extension:  #dpkg-deb-fsys-tarfile fil E.deb | Tar xvf-ar p  file.deb data.tar.gz | Tar xvzf-  14. File:  with. zip extension #unzip file.zip  unzip files in WinZip format under Linux   if the JDK is installed, you can use the jar command; P command.   Unzip directly. tar.gz file   xxxx.tar.gz file use the tar with the ZXVF parameter, which can be unpacked at once. XXXX is the file name. For example:  $tar ZXVF xxxx.tar.gz Decompression of various compressed files (installation method)     File extension Decompression (Installation method)    . A AR XV file.a . Z uncompress file. z . GZ gunzip file.gz . bz2 bunzip2 file.bz2 . Tar. Z Tar xvzf file.tar.z&nBsp COMPRESS-DC File.tar.z | Tar xvf- . Tar.gz/.tgz tar xvzf file.tar.gz  gzip-dc file.tar.gz | Tar xvf- . tar.bz2 tar xvif file.tar.bz2  bzip2-dc file.tar.bz2 | XVF- . Cpio.gz/.cgz GZIP-DC File.cgz | cpio-div . Cpio/cpio cpio-div file.cpio  cpio-divc file.cpio . Rpm/install rpm-i file.rpm . RP M/extract Rpm2cpio file.rpm | cpio-div . Deb/install dpkg-i file.deb . Deb/exrtact dpkg-deb-fsys-tarfile File.deb | Tar xvf-  ar p file.deb data.tar.gz | Tar xvzf- . zip unzip file.zip      bzip2-d myfile.tar.bz2 | Tar xvf      tar xvfz myfile.tar.bz2      x is decompression   V is complex output   F is specified file   Z GZ format       gzip  gzip[options] The filename to compress (or decompress)  -C writes the output to the standard output and retains the original file.  -D compresses the compressed file.  -L Displays the following fields for each compressed file: The size of the compressed file, the size of the uncompressed file, the compression ratio, the name of the uncompressed file  -R recursively finds the specified directory and compresses or compresses all of its files. The  -T test compression file is just intact.  -V for each compressed and uncompressed file, display its file name and compression ratio. -num-adjusts the speed of compression with the specified number.   Example:  a backup of the/usr directory and all files including its subdirectories, the backup file name is usr.tar  tar cvf usr.tar/home  All files in the/USR directory and including its subdirectories  Copy and compress, the backup file name is usr.tar.gz  tar czvf usr.tar.gz/usr  compress a set of files with a suffix of tar.gz  #tar cvf back.tar/back/  #gzip-Q back.tar  or  #tar cvfz back.tar.gz/back/  release a file with the suffix tar.gz.   #tar zxvf back.tar.gz  #gzip back.tar.gz  #tar xvf Back.tar

The use of various decompression files, such as the tar decompression bz2 under CentOS

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.