Linux compression, archive commands

Source: Internet
Author: User

Compact format: GZ, bz2, XZ, zip, Z

Compression algorithm: Different algorithm, compression ratio will also be different

Gzip:.gz

Gzip/path: Deleting source files after compression

-D: Unzip

-# 1-9: Specify compression ratio

Gunzip: The original file will be deleted when the decompression is complete

Zcat: Without pressure view the contents of a text file


bzip2:.bz2

Greater compression ratio than gzip

-D Decompression

-K Keep the original file when compressing

BUNZIP2: Unzip

Bzcat: Without pressure view the contents of a text file


Xz:.xz

Usage with gzip, bzip2

Unxz

Xzdec

Xzcat


Zip: Can compress the directory

Format: Zip compressed file name to be compressed

Unzip: Unzip


Tar: Archive tool

-C Create an archive file

-F Filename.tar Operation archive file

-X Expand Archive

--xattrs Preserve extended properties of files when archiving

-T do not expand archive to see which files are archived


-ZCVF Archive and Compress

-ZXVF Unzip and expand the archive


Cpio: Archive Tool


This article is from the "ngames" blog, make sure to keep this source http://ngames.blog.51cto.com/3187187/1547864

Linux compression, archive commands

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.