Right now
1. Files downloaded from the Internet are compressed files.
2, reduce the space to use the compressed file.
So it is necessary for us to learn how to compress and decompress files.
Compression and packaging commands for Linux documents
There are many compression methods supported in Linux, but the most commonly used compression methods are:
Tar There are two ways to compress the command (GZ & bz2)
Now we're going to start learning about its use ...
Command |
Tar |
Function |
Package and unpack your files |
Grammar |
tar [-ZJXCVFPP] Filenam e |
Extended |
- Z : Whether to use both gzip Compression
-j : Whether to use both bzip2 Compression - x : Unpacking or decompressing - T : View Tar the files inside the package - C : Establish a Tar package or zip file package - v : Visualize - F: followed by file name, compressed with- Ffile name, meaning that the compressed filename isfilename, when decompressed with- Ffilename, meaning unzipfilename. Note that if the combination of multiple parameters is in the case with- F, please putFwrite to the last side. - P : Use the properties of the original file to compress what properties to compress before compressing what properties . (not commonly used) - P : Absolute paths can be used . (not commonly used) |
Instance |
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/50/wKioL1Q7OInhOOCsAAMjH_bjlyk543.jpg "title=" 1.png " Width= "632" height= "280" border= "0" hspace= "0" vspace= "0" style= "width:632px;height:280px;" alt= " Wkiol1q7oinhoocsaamjh_bjlyk543.jpg "/> |
Command |
tar.gz |
Grammar |
Decompression: Tar zxvf FileName.tar.gz Compression: Tar zcvf FileName.tar.gz files to be compressed |
Function |
Compress and decompress the file. |
Extended |
No |
Instance |
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/54/wKiom1Q7l6LRm23bAARq7Yyy2V8112.jpg "title=" 1.png " Width= "622" height= "338" border= "0" hspace= "0" vspace= "0" style= "width:622px;height:338px;" alt= " Wkiom1q7l6lrm23baarq7yyy2v8112.jpg "/> |
Command |
tar.bz2 |
Grammar |
Decompression: Tar jxvf FileName.tar.bz2 Compression: Tar jcvf FileName.tar.bz2 DirName |
Function |
Compress and decompress the file. |
Extended |
No |
Instance |
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/4C/54/wKiom1Q7m_njCxVrAAQQTfy7RZs661.jpg "title=" 2.png " Width= "622" height= "399" border= "0" hspace= "0" vspace= "0" style= "WIDTH:622PX;HEIGHT:399PX;" alt= "wkiom1q7m_ Njcxvraaqqtfy7rzs661.jpg "/> |
Command |
Tar jtv |
Grammar |
Tar JTV the name of the compressed package to view |
Function |
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/4C/55/wKioL1Q7oCnSZO4HAABZcCGHWM0241.jpg "title=" 3.png " alt= "Wkiol1q7ocnszo4haabzccghwm0241.jpg"/> |
Extended |
No |
Instance |
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/4C/55/wKiom1Q7oFfjbMIuAAEBLMhG7eI285.jpg "title=" 4.png " alt= "Wkiom1q7offjbmiuaaeblmhg7ei285.jpg"/> |
This article is from the "Last Bus" blog, so be sure to keep this source http://hznethome.blog.51cto.com/722914/1563421
Linux Learning Notes (13)--Command Learning (document compression and packaging)