红联Linux门户
Linux帮助

bzip2, bzcat 命令

发布时间:2006-08-21 12:57:05来源:红联作者:晚点
[root@linux ~]# bzip2 [-cdz] 档名
[root@linux ~]# bzcat 档名.bz2

参数:
-c :将压缩的过程产生的资料输出到萤幕上!
-d :解压缩的参数
-z :压缩的参数
-# :与 gzip 同样的,都是在计算压缩比的参数, -9 最佳, -1 最快!

范例:
范例一:将刚刚的 /tmp/man.config 以 bzip2 压缩
[code][root@linux tmp]# bzip2 -z man.config[/code]
# 此时 man.config 会变成 man.config.bz2 !
范例二:将范例一的文件内容读出来!
[code][root@linux tmp]# bzcat man.config.bz2[/code]
# 此时萤幕上会显示 man.config.bz2 解压缩之后的文件内容!!

范例三:将范例一的文件解压缩
[code][root@linux tmp]# bzip2 -d man.config.bz2[/code]

范例四:将范例三解开的 man.config 用最佳的压缩比压缩,并保留原本的文件
[code][root@linux tmp]# bzip2 -9 -c man.config > man.config.bz2[/code]
文章评论

共有 2 条评论

  1. 13083171023 于 2007-06-06 15:28:15发表:

    蛮详细的

  2. Redassociation 于 2006-08-21 15:47:29发表:

    谢谢介绍