Archive Decompression {tar{tar zxvpf gz.tar.gz-C to the directory in the specified directory package#Unpacking tar.gz not specifying directory is full decompressionTar zcvpf/$path/gz.tar.gz *#Packing GZ Note * Preferably with a relative pathTar zcf/$path/gz.tar.gz *#pack correctly without promptingTar ztvpf gz.tar.gz#View GZTar xvf 1.tar-c Directory#Unpacking tarTAR-CVF 1.tar *#Package TarTar TVF 1.tar#View TarTAR-RVF 1.tar file name#append file to tar tar--exclude=/home/dmtsai--exclude=*.tar-zcvf myfile.tar.gz/home/*} gzip{-D#Unzip-1~9#compression level, 1 is the worst, 9 is the best, 6 is the defaultGzip 1.txt#1.txt.gzGzip-d 1.txt.gz#1.txt} bzip2 {-Z#Compression-D#Decompression , compression level 1~9, default level is 9Bzip2 1.txt#1.txt.bz2, bZIP can be used directly when compressingBzip2-d 1.txt.bz2#1.txtBzip2-z 1.txt#CompressionNote: bzip2 cannot compress the directory, the compressed directory will be error} rar a rar.rar*.jpg#zip file as rar packageUnrar x Rar.rar#unzip the RAR package #rar3.6 Download: http://www.rarsoft.com/rar/rarlinux-3.6.0.tar.gz7z a 7z.7z*#7z Compression7z e 7z.7z#7z DecompressionUnzip Zip.zip#Unzip zipZip Zip.zip *#Compress zipXZ Compression Tool {-Z#compressed, you can use XZ directly when compressing-D#UnzipXZ 1. txt XZ-D 1.txt.xz#UnzipNote: XZ also cannot compress the directory}#Package/home,/etc, but exclude/home/dmtsai tar-n "2005/06/01"-ZCVF home.tar.gz/home #in/home, more than 2005/06/01 new files are backed up TAR-ZCVFH home.tar.gz/home #The package directory includes the connection directory tar ZCF-./| ssh [email protected] "tar zxf--c/xxxx" # while compressing one side to extract the Zgrep character 1.gz #View the file word lines Bzip2-dv 1.tar.bz2 in a compressed package #decompression bzip2 bzip2-v 1.tar #bzip2 Compression Bzcat #View bzip2 gzip A #Direct zip file # compression after source file disappears Gunzip a.gz #extract files directly # After decompression source file disappears Gzip-dv 1.tar.gz #unzip gzip to tar gzip-v 1.tar #Compress tar to GZ
Compression and packaging of Chinese files in Linux