Compression, archiving under Linux

Source: Internet
Author: User
Tags bz2

Compress bz2, XZ, zip, Z

The directory cannot be compressed and the original file is deleted by default after compression.

Gz:gzip/path/filename

-D Decompression

Gunzip/paht/some_filename

Zcat/path/somefile.gz: View the contents of the text file under the condition of no pressure.

BZIP2: There is a greater compression ratio than gzip.

Bzip2/path/some_filename

-D Decompression

-K Keep the original file

Bunzip2/path/some_filename

bzcat/path/somefile.bz2

Xz:xz/path/some_filename

-D Decompression

-K Keep the original file

Unxz

Xzcat

Zip: Can compress the directory, compressed after the default does not delete the original file

Zip Filename.zip FILE1 FILE2

Unzip Filenam.zip

Archive: Archive, consolidate multiple files into 1 files, the archive itself does not mean that the compression

The traditional method of compressing Linux

Command compress:filename.z

Ucompress


Tar: Archive tool. Tar

-C Create an archive file

-F Filename.tar Archive files that need to be manipulated

TAR-CF File.tar file*

-X Expand Archive

--xattrs Preserve extended attribute information for files while archiving

-T does not expand the archive to see which files are archived


-ZCF Archive and invoke gzip compression

-ZXF Expand Archive and invoke gzip decompression, where z can be omitted

-JCF bzip2

-jxf

-JCF XZ

-jxf

Cpio: Archive tool, older than tar


Read Variable 1 ...

Enter space as a delimiter, such as the number of variables is greater than the input, the following variable value is empty,

The number of variables is less than input, and all subsequent inputs are assigned to the last variable

-P "Dfjlfjs" prompt

Compression, archiving under Linux

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.