gzip.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-gzip" role="wrap">
  8. <?dbhtml filename="gzip.html"?>
  9. <sect1info condition="script">
  10. <productname>gzip</productname>
  11. <productnumber>&gzip-version;</productnumber>
  12. <address>&gzip-url;</address>
  13. </sect1info>
  14. <title>Gzip-&gzip-version;</title>
  15. <indexterm zone="ch-system-gzip">
  16. <primary sortas="a-Gzip">Gzip</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Gzip 软件包包含压缩和解压缩文件的程序。</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&gzip-ch6-sbu;</seg>
  26. <seg>&gzip-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>安装 Gzip</title>
  32. <para>准备安装 Gzip:</para>
  33. <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
  34. <para>编译该软件包:</para>
  35. <screen><userinput remap="make">make</userinput></screen>
  36. <para>运行以下命令以测试编译结果:</para>
  37. <screen><userinput remap="test">make check</userinput></screen>
  38. <para>已知两个测试可能在 LFS 环境中失败:help-version 和 zmore。</para>
  39. <para>安装该软件包:</para>
  40. <screen><userinput remap="install">make install</userinput></screen>
  41. <para>移动一个必须放置在根文件系统的程序:</para>
  42. <screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen>
  43. </sect2>
  44. <sect2 id="contents-gzip" role="content">
  45. <title>Gzip 的内容</title>
  46. <segmentedlist>
  47. <segtitle>安装的程序</segtitle>
  48. <seglistitem>
  49. <seg>gunzip, gzexe, gzip, uncompress (与 gunzip 互为硬链接), zcat, zcmp,
  50. zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, 以及 znew</seg>
  51. </seglistitem>
  52. </segmentedlist>
  53. <variablelist>
  54. <bridgehead renderas="sect3">简要描述</bridgehead>
  55. <?dbfo list-presentation="list"?>
  56. <?dbhtml list-presentation="table"?>
  57. <varlistentry id="gunzip">
  58. <term><command>gunzip</command></term>
  59. <listitem>
  60. <para>解压缩 gzip 压缩的文件</para>
  61. <indexterm zone="ch-system-gzip gunzip">
  62. <primary sortas="b-gunzip">gunzip</primary>
  63. </indexterm>
  64. </listitem>
  65. </varlistentry>
  66. <varlistentry id="gzexe">
  67. <term><command>gzexe</command></term>
  68. <listitem>
  69. <para>创建自解压可执行文件</para>
  70. <indexterm zone="ch-system-gzip gzexe">
  71. <primary sortas="b-gzexe">gzexe</primary>
  72. </indexterm>
  73. </listitem>
  74. </varlistentry>
  75. <varlistentry id="gzip">
  76. <term><command>gzip</command></term>
  77. <listitem>
  78. <para>使用 Lempel-Ziv (LZ77) 编码压缩文件</para>
  79. <indexterm zone="ch-system-gzip gzip">
  80. <primary sortas="b-gzip">gzip</primary>
  81. </indexterm>
  82. </listitem>
  83. </varlistentry>
  84. <varlistentry id="uncompress">
  85. <term><command>uncompress</command></term>
  86. <listitem>
  87. <para>解压压缩文件</para>
  88. <indexterm zone="ch-system-gzip uncompress">
  89. <primary sortas="b-uncompress">uncompress</primary>
  90. </indexterm>
  91. </listitem>
  92. </varlistentry>
  93. <varlistentry id="zcat">
  94. <term><command>zcat</command></term>
  95. <listitem>
  96. <para>将给定 gzip 压缩文件解压到标准输出</para>
  97. <indexterm zone="ch-system-gzip zcat">
  98. <primary sortas="b-zcat">zcat</primary>
  99. </indexterm>
  100. </listitem>
  101. </varlistentry>
  102. <varlistentry id="zcmp">
  103. <term><command>zcmp</command></term>
  104. <listitem>
  105. <para>在 gzip 压缩文件上运行 <command>cmp</command></para>
  106. <indexterm zone="ch-system-gzip zcmp">
  107. <primary sortas="b-zcmp">zcmp</primary>
  108. </indexterm>
  109. </listitem>
  110. </varlistentry>
  111. <varlistentry id="zdiff">
  112. <term><command>zdiff</command></term>
  113. <listitem>
  114. <para>在 gzip 压缩文件上运行 <command>diff</command></para>
  115. <indexterm zone="ch-system-gzip zdiff">
  116. <primary sortas="b-zdiff">zdiff</primary>
  117. </indexterm>
  118. </listitem>
  119. </varlistentry>
  120. <varlistentry id="zegrep">
  121. <term><command>zegrep</command></term>
  122. <listitem>
  123. <para>在 gzip 压缩文件上运行 <command>egrep</command></para>
  124. <indexterm zone="ch-system-gzip zegrep">
  125. <primary sortas="b-zegrep">zegrep</primary>
  126. </indexterm>
  127. </listitem>
  128. </varlistentry>
  129. <varlistentry id="zfgrep">
  130. <term><command>zfgrep</command></term>
  131. <listitem>
  132. <para>在 gzip 压缩文件上运行 <command>fgrep</command></para>
  133. <indexterm zone="ch-system-gzip zfgrep">
  134. <primary sortas="b-zfgrep">zfgrep</primary>
  135. </indexterm>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry id="zforce">
  139. <term><command>zforce</command></term>
  140. <listitem>
  141. <para>为给定所有文件中的 gzip 压缩文件确保
  142. <filename class="extension">.gz</filename> 扩展名,
  143. 这样 <command>gzip</command> 就不会重复压缩它们;
  144. 在文件传输过程中文件名被截断时,这个命令很有用</para>
  145. <indexterm zone="ch-system-gzip zforce">
  146. <primary sortas="b-zforce">zforce</primary>
  147. </indexterm>
  148. </listitem>
  149. </varlistentry>
  150. <varlistentry id="zgrep">
  151. <term><command>zgrep</command></term>
  152. <listitem>
  153. <para>在 gzip 压缩文件上运行 <command>grep</command></para>
  154. <indexterm zone="ch-system-gzip zgrep">
  155. <primary sortas="b-zgrep">zgrep</primary>
  156. </indexterm>
  157. </listitem>
  158. </varlistentry>
  159. <varlistentry id="zless">
  160. <term><command>zless</command></term>
  161. <listitem>
  162. <para>在 gzip 压缩文件上运行 <command>less</command></para>
  163. <indexterm zone="ch-system-gzip zless">
  164. <primary sortas="b-zless">zless</primary>
  165. </indexterm>
  166. </listitem>
  167. </varlistentry>
  168. <varlistentry id="zmore">
  169. <term><command>zmore</command></term>
  170. <listitem>
  171. <para>在 gzip 压缩文件上运行 <command>more</command></para>
  172. <indexterm zone="ch-system-gzip zmore">
  173. <primary sortas="b-zmore">zmore</primary>
  174. </indexterm>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry id="znew">
  178. <term><command>znew</command></term>
  179. <listitem>
  180. <para>将 <command>compress</command> 格式压缩文件重新压缩为
  181. <command>gzip</command> 格式 —— 转换 <filename
  182. class="extension">.Z</filename> 文件为 <filename
  183. class="extension">.gz</filename> 文件</para>
  184. <indexterm zone="ch-system-gzip znew">
  185. <primary sortas="b-znew">znew</primary>
  186. </indexterm>
  187. </listitem>
  188. </varlistentry>
  189. </variablelist>
  190. </sect2>
  191. </sect1>