Gzip简介课件精品.pptVIP

  • 0
  • 0
  • 约2.87千字
  • 约 19页
  • 2017-02-02 发布于江苏
  • 举报
Gzip简介课件精品

Gzip简介 林广栋 lingd@mail.ustc.edu.cn 简介 Gzip由Jean-loup Gailly和Mark Adler编写,用于Unix系统的文件压缩 Linux系统中后缀为.gz的文件就是由Gzip创建的 Gzip已经成为Internet上非常普遍的文件压缩格式 命令行参数 gzip xx 其中xx为文件名,则gzip将自动压缩文件xx,并将其重命名为xx.gz,新的压缩文件将自动覆盖原文件 若xx.gz已存在,gzip会询问用户是否覆盖xx.gz,用户可以选择是否覆盖 命令行参数 gzip –d xx.gz 解压缩文件xx.gz,并将解压后的文件命名为xx 若文件xx已经存在,gzip会询问用户是否覆盖,用户可以选择是否覆盖 命令行参数 -h 显示帮助信息 gzip 1.2.4 (18 Aug 93) usage: gzip [-acdfhlLnNtvV19] [-S suffix] [file ...] -a --ascii ascii text; convert end-of-lines using local conventions -c --stdout write on standard output, keep original files unchanged -d --decompress decompress -f --force force overwrite of output file and compress links -h --help give this help -l --list list compressed file contents -L --license display software license -n --no-name do not save or restore the original name and time stamp -N --name save or restore the original name and time stamp -q --quiet suppress all warnings -S .suf --suffix .suf use suffix .suf on compressed files -t --test test compressed file integrity -v --verbose verbose mode -V --version display version number -1 --fast compress faster -9 --best compress better file... files to (de)compress. If none given, use standard input. 命令行参数 -V 显示gzip的版本信息,注意这里V一定要大写 命令行参数 gzip -t xx 测试文件xx的完整行 若文件xx为gzip压缩文件,则不显示任何信息 若文件xx不是gzip压缩文件,则显示 gzip xx: not in gzip format 命令行参数 gzip –f xx 强制压缩文件xx 如果xx.gz已经存在,gzip自动覆盖xx.gz,不再询问是否覆盖 命令行参数 gzip –l xx.gz或gzip xx.gz -l 显示压缩文件的信息,包括压缩文件大小,解压后大小,压缩比,原文件名 命令行参数 -L 显示版权信息 命令行参数 -num 其中num为1至9的整数,-1表示最快压缩,-9表示最优压缩,压缩后文件最小 命令行参数 -a 使用ASC码压缩 对于非文本文件,不要使用此参数,否则解压后会造成文件内容改变 因为使用文本方式压缩时,程序自动将\r转换为\r\n,改变文件内容 此错误与用文本方式读取二进制文件会犯的错误类似 命令行参数 gzip xx –S .ss 指定压缩文件的后缀名 如上命令,将指定压缩文件的后缀名为.ss 命令行参数 -c 把gzip压缩后的数据输出到标准输出,不覆盖原文件 gzip –c xx xx.gz 可以把xx压缩为xx.gz而不覆盖原来的xx 其中用到了标准输入输出重定向,即把gzip的标准输出重定向到了xx.gz文件 标准输入输出重定向 命令行中,command file或command 1 file表示将程序command的标准输出重定向到文件file 重定向后,command的所有输出到标准输出stdo

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档