Home > Backend Development > PHP Tutorial > eoiioe A complete list of decompression commands under Linux

eoiioe A complete list of decompression commands under Linux

WBOY
Release: 2016-07-29 09:02:19
Original
1606 people have browsed it

Original address: http://www.cnblogs.com/eoiioe/archive/2008/09/20/1294681.html
.tar
Unpacking: tar xvf FileName.tar
Packaging: tar cvf FileName.tar DirName
( Note: tar is packaged, not compressed!)
——————————————
.gz
Decompression 1: gunzip FileName.gz
Decompression 2: gzip -d FileName.gz
Compression: gzip FileName
.tar.gz and .tgz
Decompression: tar zxvf FileName.tar.gz
Compression: tar zcvf FileName.tar.gz DirName
——————————————
.bz2
Decompression 1: bzip2 -d FileName.bz2
Decompression 2: bunzip2 FileName.bz2
Compression: bzip2 -z FileName
.tar.bz2
Decompression: tar jxvf FileName.tar.bz2
Compression: tar jcvf FileName.tar.bz2 DirName
——————————————
.bz
Extract 1: bzip2 -d FileName.bz
Extract 2: bunzip2 FileName.bz
Compression: Unknown
.tar.bz
Extract: tar jxvf FileName.tar.bz
Compression: Unknown
——————————————
.Z
Decompression: uncompress FileName.Z
Compression: compress FileName
.tar.Z
Decompression: tar Zxvf FileName.tar.Z
Compression: tar Zcvf FileName.tar.Z DirName
————————————————
.zip
Unzip: unzip FileName.zip
Compression: zip FileName. zip DirName
——————————————
.rar
Extract: rar x FileName.rar
Compress: rar a FileName.rar DirName
—————————— ————
.lha
Decompression: lha -e FileName.lha
Compression: lha -a FileName.lha FileName
————————————————
.rpm
Unpacking: rpm2cpio FileName.rpm | cpio -div
————————————————
.deb
Unpack: ar p FileName.deb data.tar.gz | tar zxf -
—————— ——————————
.tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm .deb .slp .arj .rar .ace .lha . lzh .lzx .lzs .arc .sda .sfx .lnx .zoo .cab .kar .cpt .pit .sit .sea
Decompression: sEx x FileName.*
Compression: sEx a FileName.* FileName
sEx just calls the relevant program , it does not have compression or decompression functions, please note!
gzip command
Reducing file size has two obvious benefits. One is that it can reduce storage space, and the other is that it can reduce the transmission time when transferring files over the network. gzip is a command commonly used in Linux systems to compress and decompress files. It is both convenient and easy to use.
Syntax: gzip [options] Compressed (decompressed) file name. The meaning of each option of this command is as follows:
-c writes the output to the standard output and retains the original file. -d Decompress the compressed file. -l For each compressed file, display the following fields: size of compressed file; size of uncompressed file; compression ratio; name of uncompressed file -r Recursively search the specified directory and compress or decompress all files in it. -t test, check whether the compressed file is complete. -v For each compressed and decompressed file, display the file name and compression ratio. -num adjusts the compression speed with the specified number num, -1 or --fast indicates the fastest compression method (low compression ratio), -9 or --best indicates the slowest compression method (high compression ratio). The system default value is 6. Command example:
gzip *% Compress each file in the current directory into a .gz file. gzip -dv *% Decompress each compressed file in the current directory and list detailed information. gzip -l *% displays detailed information about each compressed file in Example 1 without decompressing it. gzip usr.tar% compresses the tar backup file usr.tar, and the extension of the compressed file is .tar.gz.

The above introduces the complete list of decompression commands under eoiioe Linux, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template