How to solve the name of Gzip under Linux?
1. Documents to the extension of .a.
#TAR XV file.a
2. Files with .z as extensions:
#uncompress file.z
3. With .gz as an extension file:
#gunzip file.gz
4. Files of the extension of .bz2:
# bunzip2 file.bz2
5. Files for the extension of .tar.z:
#TAR XVZF file.tar.z
Or #compress -dc file.tar.z | tar xvf -
6. Documents to the extension with .tar.gz / .tgz:
#tar xvzf file.tar.gz
Or gzip -dc file.tar.gz | tar xvf -
7. Documents to the extension with .tar.bz2:
#TAR XVIF file.tar.bz2
Or bzip2 -dc file.tar.bz2 | XVF -
8. Files for the extension with .cpio.gz / .cgz:
#gzip -dc file.cgz | CPI -DIV
9. Files of the extended names with .cpio / cpio:
#CPIO -DIV file.cpio
Or cpio -divc file.cpio
10. Installation of files with.rpm as an extension:
# rpm -i file.rpm
11. Decompose the file with.rpm to the extension:
# rpm2cpio file.rpm | CPI-Div
12. Installation of files for the extension of .DEB:
#dpkg -i file.deb
13. Decompose the files for the extension of .deb:
# DPKG-Deb --FSYS-TARFILE FILE.DEB | TAR XVF - Ar P
File.deb data.tar.gz | TAR XVZF -
14. Files with .zip as the extension:
#unzip file.zip
Decompress the files in Winzip format under Linux
If you install JDK, you can use the jar command; you can also use the unzip command.
Directly decompressed .tar.gz file
The xxxx.tar.gz file uses the TAR with ZXVF parameters to decompress it at a time. XXXX is the file name. E.g:
$ TAR ZXVF XXXX.TAR.GZ Decompression (Installation Method) of Various Compressed Files
File extension decompression (installation method)
.a
AR XV file.a
------------------------------------
.Z
Uncompress file.z
------------------------------------
.gz
Gunzip file.gz
------------------------------------
.bz2
Bunzip2 file.bz2
------------------------------------
.tar.z
Tar xvzf file.tar.z
Compress -dc file.tar.z | TAR XVF -
------------------------------------
.tar.gz / .tgz
Tar xvzf file.tar.gz
Gzip -dc file.tar.gz | TAR XVF -
------------------------------------
.tar.bz2
TAR XVIF file.tar.bz2
Bzip2 -dc file.tar.bz2 | xvf -
------------------------------------
.cpio.gz / .cgz
Gzip -dc file.cgz | CPI-Div
------------------------------------
.CPIO / CPIO
CPI-Div file.cpio
Cpio -divc file.cpio
------------------------------------. rpm / install
RPM -I file.rpm
------------------------------------
.rpm / extract
RPM2CPIO file.rpm | CPI-Div
------------------------------------
.DEB / INSTALL
DPKG -I file.deb
------------------------------------
.DEB / EXRTACT
DPKG-Deb --fsys-Tarfile File.deb | TAR XVF -
Ar P File.deb Data.Tar.gz | Tar XVZF -
------------------------------------
.zip
Unzip file.zip
------------------------------------
Bzip2 -d myfile.tar.bz2 | tar xvf
Tar xvfz myfile.tar.bz2
X is unzipped
v is a complex output
f is a specified file
Z gz format
*********************************************************** **************************************************
gzip
Gzip [option] to compress the file name (or uncompressed)
-c Write the output to the standard output and retains the original file.
-d will compress the compressed file.
-l For each compressed file, display the following field: The size of the compressed file, the size of the uncompressed file, the compression ratio, the name of the uncompressed file
-r is classified to find all files that specify and compress or compress or compress or compress or compress or compress all files.
-t test compression file is complete.
-v Displays the file name and compression ratio for each compressed and decompressed file.
-Num-Adjust the speed of compression with the specified number.
Example:
Make a backup file called usr.tar with all the files in the / usr directory and includes its subdirectory.
TAR CVF USR.TAR / HOME
Make a backup and compress all files, including its subdirectory, including its subdirectory, backup file name is usr.tar.gz
Tar Czvf usr.tar.gz / usr
Compressed a set of files, the suffix of the file is tar.gz
#TAR CVF back.tar / back /
#gzip -q back.tar
oral
#TAR CVFZ back.tar.gz / back /
Release a file that suffix Tar.gz.
#tar zxvf back.tar.gz
#gzip back.tar.gz
#TAR XVF back.tar