Ubuntu系统下解压缩方法汇总
1、.tar的打包文件,解包方法:tar -xf CompressedFile.tar -C ./,其中-C后面指定解包路径;打包方法:tar -cf CompressedFile.tar test.file。

2、.gz的压缩文件,解压方法:gunzip test.file.gz;压缩方法gzip test.file。

3、.tar.gz的压缩文件,解压方法:tar -zxf CompressedFile.tar.gz -C ./,其中-C后面指定解压路径;压缩方法:tar -zcf CompressedFile.tar.gz test.file。

4、.bz2的压缩文件,解压方法:bzip2 -d test.file.bz2;压缩方法:bzip2 test.file。

5、.tar.bz2的压缩文件,解压方法:tar -jxf test.file.tar.bz2 -C ./;压缩方法:tar -jcf test.file.tar.bz2 test.file。

6、.zip的压缩文件,解压方法:zip test.file.zip;压缩方法:unzip test.file.zip test.file,压缩目录使用-r DirName。

7、.rar的压缩文件,解压方法:rar x test.file.rar;压缩方法:rar a test.file.rar test.file。
