Linux under the Tar decompression GZ decompression bz2, such as the use of various decompression files __linux

Source: Internet
Author: User
Tags bz2 rar unpack uncompress
Roughly summed up the Linux under the various formats of compression package compression, decompression methods. But some of the methods I did not use, also not all, I hope you help me to add, I will be ready to modify, thank you.

. tar
Unpack: Tar xvf Filename.tar
Packing: Tar cvf filename.tar dirname
(Note: Tar is packed, not compressed.) )
———————————————
. 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
Decompression 1:bzip2-d filename.bz2
Decompression 2:BUNZIP2 filename.bz2
Compression: Bzip2-z FileName
. tar.bz2
Decompression: Tar jxvf FileName.tar.bz2 or tar--bzip xvf FileName.tar.bz2
Compression: Tar jcvf FileName.tar.bz2 dirname
———————————————
. BZ
Decompression 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
Compresses 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 to: http://www.rarsoft.com/download.htm download.
After decompression, copy the rar_static to the/usr/bin directory (other directories specified by the $PATH environment variable can also):
[ROOT@WWW2 tmp]# CP Rar_static/usr/bin/rar
———————————————
. Lha
Decompression: Lha-e Filename.lha
Compression: Lha-a Filename.lha FileName

LHA please go to: http://www.infor.kanazawa-it.ac.jp/~ishii/lhaunix/download.
> Copy the LHA to the/usr/bin directory after decompression (other directories specified by the $PATH environment variable may also be available):
[ROOT@WWW2 tmp]# CP lha/usr/bin/
———————————————
. rpm
Unpack: Rpm2cpio filename.rpm | Cpio-div
———————————————
. deb
Unpack: ar p filename.deb data.tar.gz | Tar zxf-
———————————————
. Tar. tgz. tar.gz. Tar. Z. tar.bz. tar.bz2. Cpio. rpm. Arj. Lha. Lzh. Lzx. Lzs. SDA. cab SFX. Lnx. P. SLP. Zoo. it. Sit. Sea
Decompression: sEx x filename.*
Compression: SEx a filename.* FileName

Sex just call the relevant program, itself and no compression, decompression function, please note.
Sex please go to: http://sourceforge.net/projects/sex download.
After decompression, copy the sex to the/usr/bin directory (other directories specified by the $PATH environment variable can also):
[ROOT@WWW2 tmp]# CP sex/usr/bin/linux Common File decompression methods and commands
System System

1. Files with the extension of. A:
#tar XV File.a
2. Files with a. z Extension:
#uncompress file. Z
3. Files with the extension of. GZ:
#gunzip file.gz
4. Files with a. bz2 extension:
#bunzip2 file.bz2
5. Files with a. tar.z extension:
#tar Xvzf File.tar.z
or #compress-dc File.tar.z | Tar xvf
6. Files with a. tar.gz/.tgz extension:
#tar Xvzf file.tar.gz
or GZIP-DC file.tar.gz | Tar xvf-
7. Files with a. tar.bz2 extension:
#tar xvif file.tar.bz2
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.