最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Linux compress命令详解 Linux compress命令怎么用
时间:2016-12-06 编辑:简简单单 来源:一聚教程网
语法
compress [-dfvcV] [-b maxbits] [file ...]
参数:
- c 输出结果至标准输出设备(一般指荧幕)
- f 强迫写入档案,若目的档已经存在,则会被覆盖 (force)
- v 将程序执行的讯息印在荧幕上 (verbose)
- b 设定共同字串数的上限,以位元计算,可以设定的值为 9 至 16 bits 。由于值越大,能使用的共同字串就 越多,压缩比例就越大,所以一般使用预设值 16 bits (bits)
- d 将压缩档解压缩
- V 列出版本讯息
- 范例:
- 将 source.dat 压缩成 source.dat.Z ,若 source.dat.Z 已经存在,内容则会被压缩档覆盖。
- compress -f source.dat
- 将 source.dat 压缩成 source.dat.Z ,并列印出压缩比例。
- -v 与 -f 可以一起使用
- compress -vf source.dat
- 将压缩后的资料输出后再导入 target.dat.Z 可以改变压缩档名。
- compress -c source.dat > target.dat.Z
- -b 的值越大,压缩比例就越大,范围是 9-16 ,预设值是 16 。
- compress -b 12 source.dat
- 将 source.dat.Z 解压成 source.dat ,若档案已经存在,使用者按 y 以确定覆盖档案,若使用 -df 程序则会自动覆盖档案。由于系统会自动加入 .Z 为延伸档名,所以 source.dat 会自动当作 source.dat.Z 处理。
- compress -d source.dat
- compress -d source.dat.Z
相关文章
- Linux的文件权限解析 10-20
- Git文件删除操作命令解析 10-20
- Linux apache实现https的配置教程 10-18
- 远程登录Linux CentOS系统教程 10-11
- UOS系统连接打印机教程 10-10
- Linux系统安装brother打印机驱动并且设置网络打印机教程 10-10