1. Linux zip command
Compression
Zip-r filename.zip./*//Compress all files and folders in the current directory into filename.zip files
-R means recursive compression of all files in subdirectories
Extract
unzip-d test Filename.zip//Extract the Filename.zip file to./test
-d:-d test indicates that the file is extracted to the./test directory;
2. Linux tar command
-C: Create compressed archives
-X: Unzip
-T: View content
-J: Compression/decompression via BZIP2 support, at which time the file is preferably *.tar.bz2
-Z: Compression/decompression with GZIP support, at which point the file is preferably *.tar.gz
-F FileName: The file name to be processed after
-C DirName: Unzip in dirname directory
Compression
TAR–CVF Filename.tar *//package All files in the directory into Filename.tar
TAR–ZCF filename.tar.gz *//pack All the files in the directory into Filename.tar, and compress them in gzip to generate a gzip compressed package named filename.tar.gz
TAR–JCF filename.tar.bz2 *//pack All the files in the directory into Filename.tar, and compress them with bzip2, generate a bzip2 compressed package named filename.tar.bz2
TAR–ZCF Filename.tar.z *//pack All the files in the directory into Filename.tar, and compress them with compress, generate a umcompress compressed package named Filename.tar.z
Extract
TAR–XVF Filename.tar//Unpacking the TAR Package
TAR-ZXVF filename.tar.gz//Decompression tar.gz
TAR-JXVF filename.tar.bz2//Decompression tar.bz2
TAR-ZXVF filename.tar.z//Unzip tar. Z
3. linux rar command
To process A. rar file under Linux, you need to install RAR for Linux
Yum install rar
Compression
RAR a filename *//compress all files into a RAR package named Filename.rar
Extract
Unrar e Filename.rar Test//Extract all files from Filename.rar to./test
Compression decompression command under Linux