Linux Packaging command -- tar

Source: Internet
Author: User
For Linux Packaging commands & mdash; tar in windows, there are many compression software, such as winrar and winzip. you can package a folder. In Linux, there are two main compression commands: gzip and bzip2. the latter has a high level of compression. Players who are familiar with these two commands know that they once played the Linux Packaging command-tar in windows, there are a lot of compression software, such as winrar, winzip, and so on, can package a folder. In Linux, there are two main compression commands: gzip and bzip2. the latter has a high level of compression. Players familiar with these two commands know that they can only compress one file or file at a time. The folder or directory cannot be compressed. So how to compress folders and directories? That's right! Is tar .. Tar can compress the folder while packing. Note that the package is a file or file! Step 1: run the packaging command ~ Tar-zpcv-f report.tar.gz report tar-jpcv-f report.tar.bz2 report2. now, it's so simple O (∩) O ~ You can compare the size of the two files after packaging, which must be *. bz2 small ~ The following describes the parameters z in the tar command above -- gzip compression j -- bzip2 compression p -- retain the original attributes and permissions of the backup data v -- will be processed during the compression/decompression process file name c -- create, create a package file f. The Package File just created is followed by the compressed files gzip and bzip2. you can use zcat and bzcat to view the files after tar is packaged. you can use tar-ztv-f. report.tar.gz is used to view the compressed package file tar-jtv-f report.tar.bz2 through gzip. you can view the compressed package file bzip2. then you can explain how to decompress it later ~
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.