Linux decompression command
Extract command: command format: tar-zxvf compressed file name .tar.gz. Unzipped files can only be placed in the current directory. Extract all commands reference: tar-xvf file.tar extract tar package tar-xzvf file.tar.gz extract tar.gztar-xjvf file.tar.bz2 extract tar.bz2tar-xZvf file.tar.Z extract tar.Zunrar e file.rar extract rarunzip file.zip extract ziplinux decompression command Daquan: tar xvf FileName.tar package: tar cvf FileName.tar DirName (Note: tar is a package, not compression! )-.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 decompression 1:bzip2-d FileName.bz decompression 2:bunzip2 FileName.bz compression: unknown .tar.bz decompression: tar jxvf FileName.tar.bz compression: unknown-.Z decompression: uncompress FileName.Z compression: compress FileNametar.Z decompression: tar Zxvf FileName.tar.Z compression: Tar Zcvf FileName.tar.Z DirName-.zip decompression: unzip FileName.zip compression: zip FileName.zip DirName-.rar decompression: rar x FileName.rar compression: rar a FileName.rar DirName-.lha decompression: lha-e FileName.lha compression: lha-a FileName.lha FileName- -.rpm unpack: 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 .s da .sfx .lnx. Zoo .cab .kar .cpt. Pit .sit .sea decompression: sEx x FileName.* compression: sEx a FileName.* FileNamesEx is just calling the relevant program There is no compression and decompression function, please pay attention! The gzip command to reduce file size has two obvious benefits: one is that it reduces storage space, and the other is that it reduces the transfer time when transferring files over the network. Gzip is a command that is often used in Linux system to compress and decompress files, which is convenient and easy to use. Syntax: gzip [options] compress (decompress) the file name of this command the meaning of each option is as follows:-c writes the output to standard output and retains the original file. -d decompress the compressed file. -l for each compressed file, the following fields are displayed: the size of the compressed file; the size of the uncompressed file; the compression ratio; the name of the uncompressed file-r recursively finds the specified directory and compresses all files or decompresses it. -t test to check whether the compressed file is complete. -v displays the file name and compression ratio for each compressed and unzipped file. -num adjusts the speed of compression with the specified numeric num,-1 or-fast represents the fastest compression method (low compression ratio), and-9 or-- best represents the slowest compression method (high compression ratio). The system default is 6. Instruction example: gzip *% compresses each file in the current directory into a .gz file. Gzip-dv *% unzips each compressed file in the current directory and lists the detailed information. Gzip-l *% shows in detail the information of each compressed file in example 1 and does not extract it. Gzip usr.tar% compresses the tar backup file usr.tar, which now has the .tar.gz extension.