Compressed package decompression method in linux

Compressed package decompression method in linux

zip:
Compression:
zip [-AcdDfFghjJKlLmoqrSTuvVwXyz] [− B <working directory>] [− ll] [− n <suffix string>] [− t <date and time>] [− <compression efficiency>] [compressed file] [file...] [− i <template style>] [− x <template style>] Decompression: unzip [option] Compressed file name. zip option: − x file list to decompress the file, but does not include the specified file file. − V View the compressed file directory, but do not decompress it. − T Test whether the file is damaged, but do not decompress it. − D directory Unzip the compressed file to the specified directory. − Z Only show the comment of the compressed file. − N Do not overwrite existing files. − O Overwrite existing files without requiring user confirmation. − J Do not rebuild the directory structure of the document, and extract all files to the same directory. Example: Example 1: Decompress the compressed file text. zip in the current directory. ][-b <working directory>][-ll][-n <suffix string>][-t <date and time>][-<compression efficiency>][compressed file][file...][- i <template style>][-x <template style>] Unzip: unzip [options] the name of the compressed file. zip option: -x file list decompresses the file, but does not include the specified file file. -v View the compressed file directory, but do not decompress. -t Test whether the file is damaged, but does not decompress it. The -d directory extracts the compressed file to the specified directory. -z Only show comments for compressed files. -n Do not overwrite existing files. -o Overwrite existing files and do not require user confirmation. -j Do not rebuild the directory structure of the document, and extract all files to the same directory. Example: Example 1: Decompress the compressed file text.zip in the current directory.     ][b<Working as head record>][ll][n<Character tail character character string>][t<Day period when between>][<Pressure reduction efficiency of>] [ Compression compression paper member ] [ text element . . . ] [ - I<Fan This kind of formula>][x<Fan This kind of formula>] Solution Pressure : U n- Z I P [ Option Item ] pressure compression text element name . Z I P option items :  x text items listed in Table Solutions pressure compression text element , but not the package comprises means specified in F I L E text element .  v check to see pressure compression text element mesh record , but no solution pressure .  t test test paper piece has no damage bad , but no solution pressure .  d mesh record the pressure reduction text element solution to refer to a given destination recorded under .  z only significant shows pressure compression packets member of injection solutions .  n does not cover the lid has through stored in the text element .  o covering cap has been stored in the text element and not to be required by the user is indeed recognized .  j is not heavy construction text file of mesh catalog junction structure , to the have the text element solution pressed into the same a mesh recorded under . Example Sub : Example 1 : The pressure compression packets member T E X T . Z I P in when the front mesh record at Solutions pressure compression .   unzip text.zip
   Example 2: Decompress the compressed file text.zip in the specified directory /tmp. If the same file already exists, the unzip command is required to not overwrite the original file.
   $ unzip -n text.zip -d /tmp
  Example 3: View the compressed file directory, but do not unzip it.
   $ unzip -v text.zip
   zgrep command
   The function of this command is to find matching regular expressions in compressed files. The usage is the same as the grep command, except that the object of operation is compressed files. If users want to see if there is a certain sentence in a certain compressed file, they can use the zgrep command.

bz:
bzip2 -d FileName.bz
bunzip2 FileName.bz

bz2:
Use bunzip2 linux-2-4-2.tar.bz2 to generate linux-2-4-2.tar and
use tar xvf linux-2-4-2.tar to get the final file.

Or use
tar jxvf linux-2-4-2.tar.bz2 directly

z:
uncompress FileName.Z --decompress
compress FileName
--compress gz:
*.gz decompress with gzip -d or gunzip

tar: (packing, not decompression)
tar –xvf file.tar //decompress the tar package

Summarized
. 1, .tar codecs with tar -xvf
2,
.gz using gzip -d or gunzip it
. 3, .tar.gz and .tgz with tar -xzf codecs
. 4, the .bz2 with bunzip2 it with bzip2 -d or
5,
. tar.bz2 tar -xjf with decompression
. 6, .Z uncompress with decompression
. 7,
.tar.Z with tar -xZf codecs
. 8, .rar extracting with unrar e
. 9,
.zip unzip it with

Guess you like

Origin blog.csdn.net/qq_34134299/article/details/109114758