Package, compress, and decompress the tar command

Source: Internet
Author: User
. Tar
Unpack: tar xvf FileName.tar
Package: tar cvf FileName.tar DirName
(Note: tar is packed, not compressed !)
---------------------------------------------
. Gz
Decompress 1: gunzip FileName.gz
Decompress 2: gzip-d FileName.gz
Compression: gzip FileName
.Tar.gz
Decompress: tar zxvf FileName.tar.gz
Compression: tar zcvf FileName.tar.gz DirName
---------------------------------------------
. Bz2
Decompress 1: bzip2-d FileName.bz2
Decompress 2: bunzip2 FileName.bz2
Compression: bzip2-z FileName
.Tar.bz2
Decompress: tar jxvf FileName.tar.bz2
Compression: tar jcvf FileName.tar.bz2 DirName
---------------------------------------------
. Bz
Extract 1: bzip2-d FileName. bz
Decompress 2: bunzip2 FileName. bz
Compression: Unknown
. Tar. bz
Decompress: Tar jxvf filename.tar. bz
Compression: Unknown
---------------------------------------------
. Z
Decompress: uncompress filename. Z
Compression: compress filename
. Tar. Z
Decompress: Tar zxvf filename.tar. Z
Compression: Tar zcvf filename.tar. Z dirname
---------------------------------------------
. Tgz
Decompress: Tar zxvf filename. tgz
Compression: Unknown
. Tar. tgz
Decompress: Tar zxvf filename.tar. tgz
Compression: Tar zcvf filename.tar. tgz filename
---------------------------------------------
. Zip
Decompress: unzip filename.zip
Compression: Zip filename.zip dirname
---------------------------------------------
. Rar
Decompress: rar a filename.rar
Compression: R ar e filename.rar

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.