gzip.xml 8.1 KB

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