"Linux compression archive, tar"

Source: Internet
Author: User

I. Compression and archiving

The compression algorithm is equivalent substitution

Gzip FILE1 FILE2  ... extension. gz    -# (number): #代表压缩等级, 1-9, default 6    -D (compression): Extract    -R: Recursive compression directory gunzip: decompressed command Zcat  Viewable gzip Compressed files (no decompression required) bzip2-# (number): #代表压缩等级, 1-9, default 6 (better than gzip compression)-D (compression): Extract-K: after compression, Keep the original file Bunzip2bzcatxzunxzxzcat         

Ii. Tar

File archiving, packaging can package multiple directories or files into a large file (relative path)
Tar:tape Archive Tape Archive
Tape, linear access, disk, random access
Cpio

The main option is required, and only one can be selected.

Tar [OPTION ...] File source file list (relative path) ...
Main option (the main option is required and only one can be selected.) ):
-C: Create an archive file
-X: Extracts the contents of the release archive (released to the working directory by default)
-r: Append new content to existing file
-U: Update the modified file to the archive file
-T: View the contents of the archive file
Accessibility Options:
-j: Compressing the archive file using the Bzip2 tool
-Z: Archive files are compressed with the GZIP tool
-F: Specify the name of the archive file
-M: Sub-volume Storage archive file
-C: Specifies the release path (directory) for the released file, rather than releasing it to the current directory. (If the target location has the same name file, directly overwrite)
-K: When releasing the file, if there is a file with the same name in the target directory, the file will not be released
--exclude: Not included, when releasing a file, exclude a file (a--exclude can only exclude one file, can be reused)
-V: Show archive process (normal)
-VV: Show more detail

To create an archive file:

Tar-CF Archive source file List Release archive: (Guaranteed F option and archive file next to) tar-xf file [-c/path/to/somedir] [file name in file]tar-tf file tar-CZ F file. GZ   Note: Ensure that the F option and the archive file next to the TAR option "-" can be omitted without writing   

"Linux compression archive, tar"

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.