gzip.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/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. <title>Gzip-&gzip-version;</title>
  10. <indexterm zone="ch-system-gzip">
  11. <primary sortas="a-Gzip">Gzip</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Gzip package contains programs for compressing and decompressing
  16. files.</para>
  17. <segmentedlist>
  18. <segtitle>&buildtime;</segtitle>
  19. <segtitle>&diskspace;</segtitle>
  20. <seglistitem>
  21. <seg>&gzip-ch6-sbu;</seg>
  22. <seg>&gzip-ch6-du;</seg>
  23. </seglistitem>
  24. </segmentedlist>
  25. </sect2>
  26. <sect2 role="installation">
  27. <title>Installation of Gzip</title>
  28. <para>Gzip has 2 known security vulnerabilities. The following patch
  29. addresses both of them:</para>
  30. <screen><userinput>patch -Np1 -i ../&gzip-security_fix-patch;</userinput></screen>
  31. <para>The <command>gzexe</command> command calls <command>tail</command>
  32. with options that do not conform to newer versions of the POSIX standard,
  33. and therefore are not accepted by current versions of Coreutils. Fix this
  34. problem by issuing the following command:</para>
  35. <screen><userinput>sed -i 's/tail +/tail -n +/' gzexe.in</userinput></screen>
  36. <para>Prepare Gzip for compilation:</para>
  37. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  38. <para>The <command>gzexe</command> script has the location of the
  39. <command>gzip</command> binary hard-wired into it. Because the
  40. location of the binary is changed later, the following command ensures
  41. that the new location gets placed into the script:</para>
  42. <screen><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
  43. <para>Compile the package:</para>
  44. <screen><userinput>make</userinput></screen>
  45. <para>This package does not come with a test suite.</para>
  46. <para>Install the package:</para>
  47. <screen><userinput>make install</userinput></screen>
  48. <para>Move the <command>gzip</command> program to the <filename
  49. class="directory">/bin</filename> directory and create some commonly used
  50. symlinks to it:</para>
  51. <screen><userinput>mv -v /usr/bin/gzip /bin
  52. rm -v /usr/bin/{gunzip,zcat}
  53. ln -sv gzip /bin/gunzip
  54. ln -sv gzip /bin/zcat
  55. ln -sv gzip /bin/compress
  56. ln -sv gunzip /bin/uncompress</userinput></screen>
  57. </sect2>
  58. <sect2 id="contents-gzip" role="content">
  59. <title>Contents of Gzip</title>
  60. <segmentedlist>
  61. <segtitle>Installed programs</segtitle>
  62. <seglistitem>
  63. <seg>compress (link to gzip), gunzip (link to gzip), gzexe, gzip,
  64. uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff,
  65. zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg>
  66. </seglistitem>
  67. </segmentedlist>
  68. <variablelist>
  69. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  70. <?dbfo list-presentation="list"?>
  71. <?dbhtml list-presentation="table"?>
  72. <varlistentry id="compress">
  73. <term><command>compress</command></term>
  74. <listitem>
  75. <para>Compresses and decompresses files</para>
  76. <indexterm zone="ch-system-gzip compress">
  77. <primary sortas="b-compress">compress</primary>
  78. </indexterm>
  79. </listitem>
  80. </varlistentry>
  81. <varlistentry id="gunzip">
  82. <term><command>gunzip</command></term>
  83. <listitem>
  84. <para>Decompresses gzipped files</para>
  85. <indexterm zone="ch-system-gzip gunzip">
  86. <primary sortas="b-gunzip">gunzip</primary>
  87. </indexterm>
  88. </listitem>
  89. </varlistentry>
  90. <varlistentry id="gzexe">
  91. <term><command>gzexe</command></term>
  92. <listitem>
  93. <para>Creates self-decompressing executable files</para>
  94. <indexterm zone="ch-system-gzip gzexe">
  95. <primary sortas="b-gzexe">gzexe</primary>
  96. </indexterm>
  97. </listitem>
  98. </varlistentry>
  99. <varlistentry id="gzip">
  100. <term><command>gzip</command></term>
  101. <listitem>
  102. <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para>
  103. <indexterm zone="ch-system-gzip gzip">
  104. <primary sortas="b-gzip">gzip</primary>
  105. </indexterm>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry id="uncompress">
  109. <term><command>uncompress</command></term>
  110. <listitem>
  111. <para>Decompresses compressed files</para>
  112. <indexterm zone="ch-system-gzip uncompress">
  113. <primary sortas="b-uncompress">uncompress</primary>
  114. </indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="zcat">
  118. <term><command>zcat</command></term>
  119. <listitem>
  120. <para>Decompresses the given gzipped files to standard output</para>
  121. <indexterm zone="ch-system-gzip zcat">
  122. <primary sortas="b-zcat">zcat</primary>
  123. </indexterm>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry id="zcmp">
  127. <term><command>zcmp</command></term>
  128. <listitem>
  129. <para>Runs <command>cmp</command> on gzipped files</para>
  130. <indexterm zone="ch-system-gzip zcmp">
  131. <primary sortas="b-zcmp">zcmp</primary>
  132. </indexterm>
  133. </listitem>
  134. </varlistentry>
  135. <varlistentry id="zdiff">
  136. <term><command>zdiff</command></term>
  137. <listitem>
  138. <para>Runs <command>diff</command> on gzipped files</para>
  139. <indexterm zone="ch-system-gzip zdiff">
  140. <primary sortas="b-zdiff">zdiff</primary>
  141. </indexterm>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry id="zegrep">
  145. <term><command>zegrep</command></term>
  146. <listitem>
  147. <para>Runs <command>egrep</command> on gzipped files</para>
  148. <indexterm zone="ch-system-gzip zegrep">
  149. <primary sortas="b-zegrep">zegrep</primary>
  150. </indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="zfgrep">
  154. <term><command>zfgrep</command></term>
  155. <listitem>
  156. <para>Runs <command>fgrep</command> on gzipped files</para>
  157. <indexterm zone="ch-system-gzip zfgrep">
  158. <primary sortas="b-zfgrep">zfgrep</primary>
  159. </indexterm>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="zforce">
  163. <term><command>zforce</command></term>
  164. <listitem>
  165. <para>Forces a <filename class="extension">.gz</filename> extension on
  166. all given files that are gzipped files, so that <command>gzip</command>
  167. will not compress them again; this can be useful when file names were
  168. truncated during a file transfer</para>
  169. <indexterm zone="ch-system-gzip zforce">
  170. <primary sortas="b-zforce">zforce</primary>
  171. </indexterm>
  172. </listitem>
  173. </varlistentry>
  174. <varlistentry id="zgrep">
  175. <term><command>zgrep</command></term>
  176. <listitem>
  177. <para>Runs <command>grep</command> on gzipped files</para>
  178. <indexterm zone="ch-system-gzip zgrep">
  179. <primary sortas="b-zgrep">zgrep</primary>
  180. </indexterm>
  181. </listitem>
  182. </varlistentry>
  183. <varlistentry id="zless">
  184. <term><command>zless</command></term>
  185. <listitem>
  186. <para>Runs <command>less</command> on gzipped files</para>
  187. <indexterm zone="ch-system-gzip zless">
  188. <primary sortas="b-zless">zless</primary>
  189. </indexterm>
  190. </listitem>
  191. </varlistentry>
  192. <varlistentry id="zmore">
  193. <term><command>zmore</command></term>
  194. <listitem>
  195. <para>Runs <command>more</command> on gzipped files</para>
  196. <indexterm zone="ch-system-gzip zmore">
  197. <primary sortas="b-zmore">zmore</primary>
  198. </indexterm>
  199. </listitem>
  200. </varlistentry>
  201. <varlistentry id="znew">
  202. <term><command>znew</command></term>
  203. <listitem>
  204. <para>Re-compresses files from <command>compress</command> format to
  205. <command>gzip</command> format&mdash;<filename
  206. class="extension">.Z</filename> to <filename
  207. class="extension">.gz</filename></para>
  208. <indexterm zone="ch-system-gzip znew">
  209. <primary sortas="b-znew">znew</primary>
  210. </indexterm>
  211. </listitem>
  212. </varlistentry>
  213. </variablelist>
  214. </sect2>
  215. </sect1>