The tar summary of the Linux compression command (v)

Source: Internet
Author: User
Tags bz2

Tar supportpackage and compress, support directories and files, use a wide range of compression tools on Linux

Tar Packaging:

TAR-CVF 171210.tar?.. /d6z/

Package a directory, the format is the first package after the file name, packaged directory, if the package after the file name exists, will be directly overwritten without prompting

TAR-XVF 171210.tar

Unpack if there is a file with the same name directly overwrite without prompting

?

TAR-CVF Test.tar?/1/1.txt 3.txt

Package files and directories at the same time,

TAR-TF Test.tar

View a list of packaged files or directories

TAR-CVF 171211.tar? --exclude Test.tar--exclude 171210.tar 1.txt 2.txt 1/

--exclude filter out some files not packaged

TAR-CVF 171211.tar? --exclude "*.txt". /d6z/

Do not package txt files

Tar compression and packaging

TAR-CZVF 1.tar.gz./

-Z Package and use gzip to compress the directory

TAR-CZVF 1.tar.gz? 1.txt 2.txt 3.txt

Package and compress the specified files to a compressed package using gzip

TAR-ZXVF 1.tar.gz

Unzip the GZ compressed package to the current directory

< P style= "font-family: ' Microsoft Jacob Black '; font-size:19px;" >TAR-CJVF 1.tar.bz2? [1-3].txt

-j Pack and use b zip 2 compress the specified file to the compressed package

TAR-JXVF 1.tar.bz2

Unzip bz2 Compress package to current directory

TAR-CJVF 1.tar.xz? [1-3].txt

-J package and use XZ to compress the specified file to the compressed package

< P style= "font-family: ' Microsoft Jacob Black '; font-size:19px;" >du-sh 1.tar.*

988k??? 1.tar.gz

TAR-TF 1.tar.gz /bz2/xz

View a list of compressed files


The tar summary of the Linux compression command (v)

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.