Common usage of TAR commands under Linux

Source: Internet
Author: User

List of tar parameters:

-C: Create compressed archives
-X: Unzip
-T: View content
-r: Append files to the end of a compressed archive file
-U: Update files in original compressed package

These five are stand-alone commands, which use one of the compression decompression, and can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed.

-Z: With gzip properties
-j: With the bz2 attribute
-Z: With the Compress attribute
-V: Show All procedures
-O: Unpack the file to standard output

The following parameter-F is required

-F: Use the file name, remember that this parameter is the last parameter, can only be followed by the file name.

The common command parameters are-c,-x,-z,-j,-v,-f.

Common usage:

1, packaging

TAR-CVF all.tar xxx pack xxx into All.tar

TAR-CZVF all.tar.gz XXX package xxx into tar, and compress into. gz format

TAR-CJVF all.tar.bz2 XXX package xxx into tar, and compress into. bz2 format


TAR-XVF All.tar unzip. Tar Package

TAR-XZVF all.tar.gz extract. tar.gz bag

TAR-XJVF all.tar.bz2 extract. tar.bz2 bag


Common usage of TAR commands under Linux

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.