Compression and decompression of linux-files

Source: Internet
Author: User

Compression

1. Definition: Compression is a large file through a number of compression algorithms into small files

2. Purpose: Mainly to reduce the size of the file, which will save the disk or tape storage file space, and the transmission of these small files on the network will also reduce network browsing (that is, to save network bandwidth)

Unzip

1. Definition : Decompression is to restore a file through a number of compression algorithm to the image before compression

Example:

gzip command

1) Gzip file1-c >/path/name.gz #将文件file1压缩成. gz Format for compressed packets

2) Gunzip file1.gz > #将压缩文件file1. GZ decompression

bzip2 command

1) bzip2 file2 > #将文件file1压缩成. bz2 Format Compressed Package

2) bunzip2 file2.bz2 > #将压缩文件file1. bz2 decompression

Compress and decompress with the tar command

1) Tar Cvfz testdir.tar.gz testdir #使用tar命令将testdir目录打包而且同时使用gzip的技术压缩打包文件的方法

2) tar cvfj testdir.tar.bz2 testdir #使用tar命令将testdir目录打包同时使用bzip2的技术压缩打包文件的方法

Compression and decompression of linux-files

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.