码迷,mamicode.com
首页 > 其他好文 > 详细

命令-bzip2/bunzip2/bzcat

时间:2017-03-23 10:48:18      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:center   style   

 bzip2/bunzip2/bzcat 命令

【NAME】
     bzip2, bunzip2 - a block-sorting file compressor, v1.0.6
     bzcat - decompresses files to stdout
     bzip2recover - recovers data from damaged bzip2 files
【SYNOPSIS】
     bzip2  [OPTION]...  FILE...
【OPTIONS】
     -d:解压缩
     -#:指定压缩比;默认是6;数字越大压缩比越大(1-9);
     -k:keep,保留原文件;
【EXAMPLES】
示例:
  1. [root@Centos7-171 tmp]# bzip2 messages   #压缩
  2. [root@Centos7-171 tmp]# ll -h messages*
  3. -rw------- 1 root root 5.8K Mar 22 16:26 messages.bz2
  4. -rw-r--r-- 1 root root 7.0K Mar 22 16:27 messages.gz
  5. [root@Centos7-171 tmp]# bzip2 -d messages.bz2   #解压缩
  6. [root@Centos7-171 tmp]# ll -h messages
  7. -rw------- 1 root root 85K Mar 22 16:26 messages
示例:bzip2 -k参数,压缩后保留原文件;
  1. [root@Centos7-171 tmp]# bzip2 -k messages
  2. [root@Centos7-171 tmp]# ll -h messages*
  3. -rw------- 1 root root  85K Mar 22 16:26 messages
  4. -rw------- 1 root root 5.8K Mar 22 16:26 messages.bz2
  5. -rw-r--r-- 1 root root 7.0K Mar 22 16:27 messages.gz
示例:bzcat,查看bzip2压缩后的文件内容
  1. [root@Centos7-171 tmp]# bzcat messages.bz2

命令-bzip2/bunzip2/bzcat

标签:center   style   

原文地址:http://zhucke.blog.51cto.com/180229/1909425

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!