1. zip format
2. rar format
RAR is a private format for file compression and archiving. It is used for data compression and archiving packaging. Simply put, it is the file format suffix name of the original file data saved after compression processing. Usually Windows users are more common compression software WinRAR , by using WinRAR to compress the file data, the default file format saved is RAR format.
The rar command uses methods a to add files to the archive c to add comments to the archive ( the maximum size of the comments cannot exceed 62000 bytes ) cf to add file comments ( when the 'v' parameter is used to display the file comments, the maximum cannot exceed 32767 bytes) ch Change the compressed archive parameter cw write archive remarks to the specified file d delete the file from the archive e unzip the file to the current directory ( do not create any subdirectories ) f refresh the files in the archive ( update the changes of these files since they were packed , not in the archive
new in the case ) i[par]= Find specific characters in archives k to lock archives ( any commands that try to change the contents of compressed archives will be ignored ) l[t,b] list archives [technical, bare] m[ f] move into archive [ file only ] p print file to stdout r patch archive
rc rebuild lost volume rn rename file in archive rr[N] add data recovery record rv[N] create recovery Conversion between volume s[name|-] archive and SFX ( self-extracting archive ) t test archive u
update files in zip archive v[t,b] list zip archive details [technical,bare] x unzip to full path
$unrar --help
Usage : unrar - - <@listfiles...> < command > e extract files to the current directory l[t,b] list archive information [technical, bare] p print files to standard output t test zip i rust v [t,b] List the details of the compressed file [technical,bare] x Extract the file to the full path [root@localhost ~]# unrar e anaconda-ks.cfg.rar /home/
3. tar format
Tar是在Linux中使用得非常广泛的文档打包格式。它的好处就是它只消耗非常少的CPU以及时间去打包文件,他仅仅只是一个打包工具,并不负责压缩。下面是如何打包一个目录:
四、tar.gz格式
五、tar.bz2格式
这种压缩格式是我们提到的所有方式中压缩率最好的。当然,这也就意味着,它比前面的方式要占用更多的CPU与时间。