linux--(5) file and file system compression and packaging

Source: Internet
Author: User

Concept One: Common zip file extension names

. z compress files that are compressed by the program.

. GZ gzip Program files that are compressed.

Files compressed by the. BZ2 bzip2 program.

The. Tar tar program does not compress the data that is packaged.

. tar.gz Tar program packed data, GZIP program compressed files.

The. TAR.BZ2 Tar program packages The data, bzip2 the files that the program compresses.

Concept Two: The difference between packaging and compression:Most of the compression commands in Linux are for a file if there is a bunch of files that need to be compressed, it's a bit of a pressure, so it's too much trouble, so there's a package command on Linux that can package a bunch of files into a file and then compress them.

compression Packaging related operations:gzip and bzip2,compress are basically obsolete when compressing commands that are common on Linux.

about gzip: This is the most widely used compression command, you can solve the compress, zip and gzip software compressed files, while its compressed files can also be extracted under the window winrar decompression. gzip compressed files can be read with Zcat in the case of decompression. compressing the source file with it will be deleted .

gzip [-cdtv#] File name

-C #将压缩数据送到屏幕上, which can be handled by data flow redirection.

-D #解压缩.

-T #检验一致性.

-V #显示压缩比等信息.

-# #这里可以填写1-9 compression level, 1 the fastest, compression ratio is small, the general compression ratio is best by default is 6.

about bzip2[-cdkzv#]: usage and gzip almost, better than gzip performance, can be read directly with Bzcat.

bzip2[-cdtkv#] File name

-C #将压缩数据送到屏幕上, which can be handled by data flow redirection.

-D #解压缩.

-T #检验一致性.

-K #会保留源文件.

-V #显示压缩比等信息.

-# #这里可以填写1-9 compression level, 1 the fastest, compression ratio is small, the general compression ratio is best by default is 6.

Package Command Tar[-ctxjzvfcpp]: package, view, unpack is this command.

usage One:tar [-j|-z] [-CV] [-F new file name] filename ... #这是压缩和打包命令形式.

-j #通过bzip2的支持进行压缩/Unzip.

-Z #通过gzip的支持进行压缩/unzip.

-C #新建打包文件.

-V #显示正在被处理的文件名.

-F filename #后面的新文件的文件名.

usage Two:tar [-j|-z] [-TV] [-F New file name] #查看打包文件内被文件名的用法.

-T #查看打包文件内部文件名.

usage Three:tar [-j|-z] [-XV] [-F new file name] [-C directory] #查看打包文件内被文件名的用法.

-X #解压.

-C #解压到特定目录.

Reference: "Bird's Linux Private cuisine"

linux--(5) file and file system compression and packaging

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.