"Linux Learning Notes" tar command summary __linux

Source: Internet
Author: User

First, look at Man tar:

NAMETar-the GNU version of the tape archiver (TAR) utility


Synopsis
Tar <operation> [Options]


Operations:
[-] A--catenate--concatenate
[-]c--create (packaged files)
[-]d--diff--compare
[-]r--append (Append)
[-]t--list (listed)
[-]u--update (update)
[-]x--extract--get (decompression)
--delete


Common Options:
-C,--directory DIR
-F,--file file
-j,--BZIP2
-j,--XZ
-P,--preserve-permissions
-V,--verbose (detail)
-Z,--gzip


Common commands:

1. Packaging Files:

TAR-CF Test.zip Test
This command is to package the test files in the current directory into Test.zip

Tar-uf all.tar logo.gif
This command updates the logo.gif file in the original tar package All.tar, and-U is the meaning of the update file.


2. Extract the file:

TAR-ZVXF Test.zip


Reference: http://www.cnblogs.com/peida/archive/2012/11/30/2795656.html

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.