Frequent file decompression method and command under Linux
1. .a. Document: #TAR XV file.a 2. Files with .z as extensions: #uncompress file.z 3. Files with .gz as extensions: #gunzip file.gz 4 Document with .bz2 as an extension: #bunzip2 file.bz2 5. Files for the extension in .tar.z: #TAR XVZF file.tar.z or #compress -dc file.tar.z | tar xvf6. Use .tar.gz / .tgz to the extension of the file: #tar xvzf file.tar.gz or gzip -dc file.tar.gz | tar xvf - 7. With .tar.bz2 as an extension file: #tar XVJ (i) f file.tar.bz2 or bzip2 -dc file.tar.bz2 | XVF - 8. With .cpio.gz / .cgz for extension file: #gzip -dc file.cgz | CPIO -DIV 9 . CPIO / CPIO is the file: #cpio -div file.cpio or cpio -divc file.cpio 10. File installation with.rpm is extension: #rpm -i file.rpm 11. Trim Decompressing the files for the extension: # rpm2cpio file.rpm | cpio -div 12. Install the file with .deb to the extension: #dpkg -i file.deb 13. Decompose the file with .deb to the extension: # DPKG-Deb --FSYS-TARFILE FILE.DEB | TAR XVF - Ar P File.deb Data.Tar.gz | TAR XVZF - 14. Files for extensions with .zip: #unzip file.zip Decompression Winzip under Linux If the file is installed, you can use the jar command; you can also use the unzip command. Directly decompressed .tar.gz file xxxx.tar.gz file Using the TAR with ZXVF parameters, you can decompress it once. XXXX is the file name. For example: $ TAR ZXVF XXXX.TAR.GZ Decompression (Installation Method) 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 XVJ (i) f file.tar.bz2 bzip2 -dc file.tar.bz2 | xvf - .cpio.gz / .cgz gzip -dc file.cgz | cpio -div .cpio / cpio CPIO -divc file.cpio cpio -divc file.cpio.rpm / install rpm -i file.rpm.rpm / extract rpm2cpio file.rpm | cpio -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 decompressed V is complex output F is specified file z Gz format Gzip Gzip [option] to compress (or uncompressed) file name -c to write the output to the standard output and retain the original file. -d will compress the compressed file.