linux下tar的使用方法

1.仅打包

tar -cvf hello.tar hello (输出文件大小为10240)

2.打包后压缩成gzip压缩格式

tar -czvf hello.tar.gz hello (输出文件大小为194)

3.打包后压缩成bzip2压缩格式

tar -cjvf hello.tar.bz2 hello (输出文件大小为207)

4.打包后压缩成xz压缩格式

tar -czvf hello.tar.xz hello (输出文件大小为236)

 

由笔者以上的测试结果可知,压缩率大小为:gzip>bzip2>xz

posted @ 2018-12-21 10:45  Jello  阅读(2127)  评论(0)    收藏  举报