gzip.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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>首先,进行 glibc-2.28 要求的一些修补:</para>
  33. <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
  34. echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen>
  35. <para>准备安装 Gzip:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
  37. <para>编译该软件包:</para>
  38. <screen><userinput remap="make">make</userinput></screen>
  39. <para>运行以下命令以测试编译结果:</para>
  40. <screen><userinput remap="test">make check</userinput></screen>
  41. <para>已知两个测试可能在 LFS 环境中失败:help-version 和 zmore。</para>
  42. <para>安装该软件包:</para>
  43. <screen><userinput remap="install">make install</userinput></screen>
  44. <para>移动一个必须放置在根文件系统的程序:</para>
  45. <screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen>
  46. </sect2>
  47. <sect2 id="contents-gzip" role="content">
  48. <title>Gzip 的内容</title>
  49. <segmentedlist>
  50. <segtitle>安装的程序</segtitle>
  51. <seglistitem>
  52. <seg>gunzip, gzexe, gzip, uncompress (与 gunzip 互为硬链接), zcat, zcmp,
  53. zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, 以及 znew</seg>
  54. </seglistitem>
  55. </segmentedlist>
  56. <variablelist>
  57. <bridgehead renderas="sect3">简要描述</bridgehead>
  58. <?dbfo list-presentation="list"?>
  59. <?dbhtml list-presentation="table"?>
  60. <varlistentry id="gunzip">
  61. <term><command>gunzip</command></term>
  62. <listitem>
  63. <para>解压缩 gzip 压缩的文件</para>
  64. <indexterm zone="ch-system-gzip gunzip">
  65. <primary sortas="b-gunzip">gunzip</primary>
  66. </indexterm>
  67. </listitem>
  68. </varlistentry>
  69. <varlistentry id="gzexe">
  70. <term><command>gzexe</command></term>
  71. <listitem>
  72. <para>创建自解压可执行文件</para>
  73. <indexterm zone="ch-system-gzip gzexe">
  74. <primary sortas="b-gzexe">gzexe</primary>
  75. </indexterm>
  76. </listitem>
  77. </varlistentry>
  78. <varlistentry id="gzip">
  79. <term><command>gzip</command></term>
  80. <listitem>
  81. <para>使用 Lempel-Ziv (LZ77) 编码压缩文件</para>
  82. <indexterm zone="ch-system-gzip gzip">
  83. <primary sortas="b-gzip">gzip</primary>
  84. </indexterm>
  85. </listitem>
  86. </varlistentry>
  87. <varlistentry id="uncompress">
  88. <term><command>uncompress</command></term>
  89. <listitem>
  90. <para>解压压缩文件</para>
  91. <indexterm zone="ch-system-gzip uncompress">
  92. <primary sortas="b-uncompress">uncompress</primary>
  93. </indexterm>
  94. </listitem>
  95. </varlistentry>
  96. <varlistentry id="zcat">
  97. <term><command>zcat</command></term>
  98. <listitem>
  99. <para>将给定 gzip 压缩文件解压到标准输出</para>
  100. <indexterm zone="ch-system-gzip zcat">
  101. <primary sortas="b-zcat">zcat</primary>
  102. </indexterm>
  103. </listitem>
  104. </varlistentry>
  105. <varlistentry id="zcmp">
  106. <term><command>zcmp</command></term>
  107. <listitem>
  108. <para>在 gzip 压缩文件上运行 <command>cmp</command></para>
  109. <indexterm zone="ch-system-gzip zcmp">
  110. <primary sortas="b-zcmp">zcmp</primary>
  111. </indexterm>
  112. </listitem>
  113. </varlistentry>
  114. <varlistentry id="zdiff">
  115. <term><command>zdiff</command></term>
  116. <listitem>
  117. <para>在 gzip 压缩文件上运行 <command>diff</command></para>
  118. <indexterm zone="ch-system-gzip zdiff">
  119. <primary sortas="b-zdiff">zdiff</primary>
  120. </indexterm>
  121. </listitem>
  122. </varlistentry>
  123. <varlistentry id="zegrep">
  124. <term><command>zegrep</command></term>
  125. <listitem>
  126. <para>在 gzip 压缩文件上运行 <command>egrep</command></para>
  127. <indexterm zone="ch-system-gzip zegrep">
  128. <primary sortas="b-zegrep">zegrep</primary>
  129. </indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="zfgrep">
  133. <term><command>zfgrep</command></term>
  134. <listitem>
  135. <para>在 gzip 压缩文件上运行 <command>fgrep</command></para>
  136. <indexterm zone="ch-system-gzip zfgrep">
  137. <primary sortas="b-zfgrep">zfgrep</primary>
  138. </indexterm>
  139. </listitem>
  140. </varlistentry>
  141. <varlistentry id="zforce">
  142. <term><command>zforce</command></term>
  143. <listitem>
  144. <para>为给定所有文件中的 gzip 压缩文件确保
  145. <filename class="extension">.gz</filename> 扩展名,
  146. 这样 <command>gzip</command> 就不会重复压缩它们;
  147. 在文件传输过程中文件名被截断时,这个命令很有用</para>
  148. <indexterm zone="ch-system-gzip zforce">
  149. <primary sortas="b-zforce">zforce</primary>
  150. </indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="zgrep">
  154. <term><command>zgrep</command></term>
  155. <listitem>
  156. <para>在 gzip 压缩文件上运行 <command>grep</command></para>
  157. <indexterm zone="ch-system-gzip zgrep">
  158. <primary sortas="b-zgrep">zgrep</primary>
  159. </indexterm>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="zless">
  163. <term><command>zless</command></term>
  164. <listitem>
  165. <para>在 gzip 压缩文件上运行 <command>less</command></para>
  166. <indexterm zone="ch-system-gzip zless">
  167. <primary sortas="b-zless">zless</primary>
  168. </indexterm>
  169. </listitem>
  170. </varlistentry>
  171. <varlistentry id="zmore">
  172. <term><command>zmore</command></term>
  173. <listitem>
  174. <para>在 gzip 压缩文件上运行 <command>more</command></para>
  175. <indexterm zone="ch-system-gzip zmore">
  176. <primary sortas="b-zmore">zmore</primary>
  177. </indexterm>
  178. </listitem>
  179. </varlistentry>
  180. <varlistentry id="znew">
  181. <term><command>znew</command></term>
  182. <listitem>
  183. <para>将 <command>compress</command> 格式压缩文件重新压缩为
  184. <command>gzip</command> 格式 —— 转换 <filename
  185. class="extension">.Z</filename> 文件为 <filename
  186. class="extension">.gz</filename> 文件</para>
  187. <indexterm zone="ch-system-gzip znew">
  188. <primary sortas="b-znew">znew</primary>
  189. </indexterm>
  190. </listitem>
  191. </varlistentry>
  192. </variablelist>
  193. </sect2>
  194. </sect1>