1. Tar command
Common parameters and examples of TAR commands:
Required Parameters :(3 parameters cannot coexist)
-C: Creates a compressed file that represents create.
-X: Unzip the file
-T: View the files inside the package!
Auxiliary Parameters :
-Z: Compressed/uncompressed with gzip
-J: Compressed/uncompressed with bzip2
-V: Show the compression/decompression progress bar
-F: Use the file name (note: F do not answer the parameters, that is,-ZXFV is wrong, to write-ZXVF)
Instance:
Unzip a file: TAR-ZXVF abc.tar.bz2
(Decompression abc.tar.bz2)
Create compressed file: TAR-ZCVF abc.tar.bz2 One.mp3 Two.mp3
(Compress One.mp3 and Two.mp3 into abc.tar.bz2)
2.7za command
Installation:
wget http://nchc.dl.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20-jxvf p7zip_9.20. 1_src_ ALL.TAR.BZ2CD P7zip_9. 20.1Makemake Install
Need to support g++ compilation, install g++:
Yum Install gcc-c++
Common parameters:
A add a file to the package or create a compressed package, such as adding 001.jpg to 001.7z, execute: 7za a 001.7z 001.jpg ; pack 001 directories to perform: 7za a 001.7z 001 ;
d Delete files from the compression, such as 001.7z 001.jpg deleted, do: 7za d 001.7z 001.jpg
l List the files in the compressed package, such as listing files in 001.7z, performing: 7za l 001.7z
e extract to the current directory, directory structure will be destroyed, such as 001.rar within the following directory and file 123/456/789.html, execute: 7za e 001.rar , Directories 123 and 456 and file 789.html will be stored in the current directory.
x Unzip (common) with the full path, execute 7za x 001.7z to extract the compressed package files to the 001 directory.
Linux Extract Command Summary