Linux Compression Decompression Command detailed introduction (GIZP, tag, zip, bzip2)

Source: Internet
Author: User
Tags gz file

--------------------------------------Compression Decompression Command-------------------------------


*windos can decompress all of the Linux system's file compression packages, but Linux will not necessarily be able to decompress all WinDOS
One: GZIP: Compressed Files---GUN zip. gz file format
Features: 1 can only compress files, cannot compress the directory
2 source files are not preserved
Example: gzip NewFile will produce a newfile.gz file package
Gunzip: Unzip (or use gzip-d)
Example: Gunzip newfile.gz

Tar: Compress unzip command
Features: Package directory (package directory as a file)
-C generate. tar package file
-V Show More information
-f Specifies the file name after compression
-Z Package simultaneous compression (old UNIX system not supported)
Example: TAR-ZCF leyangjun.tar.gz Filedir----pack filedir into leyangjun.tar.gz

2: TAR-CF Newdir.tar Newdir---compression into a tar package
Gzip Newdir.tar---sit down and compress
The above 2 steps are equivalent to
TAR-ZCVF newdir.tar.gz Newdir
Two: tar: Unpacking
-X unpack the. tar file
-V Show More information
-F Specify Unzip file
-Z Decompression
TAR-ZXF newdir.tar.gz = = = Gunzip newdir.tar.gz--TAR-XF Newdir.tar
Three: Zip (winds and Linux are generic)
Features: Can compress the file can also compress the directory
The original file will be retained
Compressed directory is plus-r
Example: Zip New.zip new compresses the new file into New.zip (this will show the compression ratio progress)
Zip-r Newdir.zip newdir (compressed into newdir.zip do not write suffix name line, plus is good to distinguish)
Unzip: Decompression
Unzip Newdir.zip

Four: Bzip2 (is an upgraded version of Gzip), all compressed files
Features: Great for compressing some large files
-K Preserve Source files
Example: Bzip2-k newfilw2 (compressed Newfile2 file,-K reserved source file)
BUNZIP2:
BUNZIP2 newfile2.bz2
Bunzip2-k newfile2.bz2 (source compressed files are preserved)

Detailed description of the Linux Compression decompression command (GIZP, tag, zip, bzip2)

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.