gzip.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-gzip" role="wrap">
  7. <title>Gzip-&gzip-version;</title>
  8. <?dbhtml filename="gzip.html"?>
  9. <indexterm zone="ch-system-gzip"><primary sortas="a-Gzip">Gzip</primary></indexterm>
  10. <sect2 role="package"><title/>
  11. <para>The Gzip package contains programs for compressing and decompressing
  12. files.</para>
  13. <segmentedlist>
  14. <segtitle>&buildtime;</segtitle>
  15. <segtitle>&diskspace;</segtitle>
  16. <seglistitem><seg>0.1 SBU</seg><seg>2.2 MB</seg></seglistitem>
  17. </segmentedlist>
  18. <segmentedlist>
  19. <segtitle>&dependencies;</segtitle>
  20. <seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
  21. GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
  22. </segmentedlist>
  23. </sect2>
  24. <sect2 role="installation">
  25. <title>Installation of Gzip</title>
  26. <para>Gzip has 2 known security vulnerabilities. The following patch
  27. addresses both of them:</para>
  28. <screen><userinput>patch -Np1 -i ../&gzip-security_fix-patch;</userinput></screen>
  29. <para>Prepare Gzip for compilation:</para>
  30. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  31. <para>The <command>gzexe</command> script has the location of the
  32. <command>gzip</command> binary hard-wired into it. Because the
  33. location of the binary is changed later, the following command ensures
  34. that the new location gets placed into the script:</para>
  35. <screen><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
  36. <para>Compile the package:</para>
  37. <screen><userinput>make</userinput></screen>
  38. <para>Install the package:</para>
  39. <screen><userinput>make install</userinput></screen>
  40. <para>Move the <command>gzip</command> program to the <filename
  41. class="directory">/bin</filename> directory and create some commonly used
  42. symlinks to it:</para>
  43. <screen><userinput>mv -v /usr/bin/gzip /bin
  44. rm -v /usr/bin/{gunzip,zcat}
  45. ln -sv gzip /bin/gunzip
  46. ln -sv gzip /bin/zcat
  47. ln -sv gzip /bin/compress
  48. ln -sv gunzip /bin/uncompress</userinput></screen>
  49. </sect2>
  50. <sect2 id="contents-gzip" role="content"><title>Contents of Gzip</title>
  51. <segmentedlist>
  52. <segtitle>Installed programs</segtitle>
  53. <seglistitem><seg>compress (link to gzip), gunzip (link to gzip), gzexe,
  54. gzip, uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff,
  55. zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg></seglistitem>
  56. </segmentedlist>
  57. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  58. <?dbfo list-presentation="list"?>
  59. <?dbhtml list-presentation="table"?>
  60. <varlistentry id="compress">
  61. <term><command>compress</command></term>
  62. <listitem>
  63. <para>Compresses and decompresses files</para>
  64. <indexterm zone="ch-system-gzip compress"><primary sortas="b-compress">compress</primary></indexterm>
  65. </listitem>
  66. </varlistentry>
  67. <varlistentry id="gunzip">
  68. <term><command>gunzip</command></term>
  69. <listitem>
  70. <para>Decompresses gzipped files</para>
  71. <indexterm zone="ch-system-gzip gunzip"><primary sortas="b-gunzip">gunzip</primary></indexterm>
  72. </listitem>
  73. </varlistentry>
  74. <varlistentry id="gzexe">
  75. <term><command>gzexe</command></term>
  76. <listitem>
  77. <para>Creates self-decompressing executable files</para>
  78. <indexterm zone="ch-system-gzip gzexe"><primary sortas="b-gzexe">gzexe</primary></indexterm>
  79. </listitem>
  80. </varlistentry>
  81. <varlistentry id="gzip">
  82. <term><command>gzip</command></term>
  83. <listitem>
  84. <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para>
  85. <indexterm zone="ch-system-gzip gzip"><primary sortas="b-gzip">gzip</primary></indexterm>
  86. </listitem>
  87. </varlistentry>
  88. <varlistentry id="uncompress">
  89. <term><command>uncompress</command></term>
  90. <listitem>
  91. <para>Decompresses compressed files</para>
  92. <indexterm zone="ch-system-gzip uncompress"><primary sortas="b-uncompress">uncompress</primary></indexterm>
  93. </listitem>
  94. </varlistentry>
  95. <varlistentry id="zcat">
  96. <term><command>zcat</command></term>
  97. <listitem>
  98. <para>Decompresses the given gzipped files to standard output</para>
  99. <indexterm zone="ch-system-gzip zcat"><primary sortas="b-zcat">zcat</primary></indexterm>
  100. </listitem>
  101. </varlistentry>
  102. <varlistentry id="zcmp">
  103. <term><command>zcmp</command></term>
  104. <listitem>
  105. <para>Runs <command>cmp</command> on gzipped files</para>
  106. <indexterm zone="ch-system-gzip zcmp"><primary sortas="b-zcmp">zcmp</primary></indexterm>
  107. </listitem>
  108. </varlistentry>
  109. <varlistentry id="zdiff">
  110. <term><command>zdiff</command></term>
  111. <listitem>
  112. <para>Runs <command>diff</command> on gzipped files</para>
  113. <indexterm zone="ch-system-gzip zdiff"><primary sortas="b-zdiff">zdiff</primary></indexterm>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry id="zegrep">
  117. <term><command>zegrep</command></term>
  118. <listitem>
  119. <para>Runs <command>egrep</command> on gzipped files</para>
  120. <indexterm zone="ch-system-gzip zegrep"><primary sortas="b-zegrep">zegrep</primary></indexterm>
  121. </listitem>
  122. </varlistentry>
  123. <varlistentry id="zfgrep">
  124. <term><command>zfgrep</command></term>
  125. <listitem>
  126. <para>Runs <command>fgrep</command> on gzipped files</para>
  127. <indexterm zone="ch-system-gzip zfgrep"><primary sortas="b-zfgrep">zfgrep</primary></indexterm>
  128. </listitem>
  129. </varlistentry>
  130. <varlistentry id="zforce">
  131. <term><command>zforce</command></term>
  132. <listitem>
  133. <para>Forces a <filename class="extension">.gz</filename> extension on all given files
  134. that are gzipped files, so that <command>gzip</command> will not compress them again; this can be
  135. useful when file names were truncated during a file transfer</para>
  136. <indexterm zone="ch-system-gzip zforce"><primary sortas="b-zforce">zforce</primary></indexterm>
  137. </listitem>
  138. </varlistentry>
  139. <varlistentry id="zgrep">
  140. <term><command>zgrep</command></term>
  141. <listitem>
  142. <para>Runs <command>grep</command> on gzipped files</para>
  143. <indexterm zone="ch-system-gzip zgrep"><primary sortas="b-zgrep">zgrep</primary></indexterm>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="zless">
  147. <term><command>zless</command></term>
  148. <listitem>
  149. <para>Runs <command>less</command> on gzipped files</para>
  150. <indexterm zone="ch-system-gzip zless"><primary sortas="b-zless">zless</primary></indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="zmore">
  154. <term><command>zmore</command></term>
  155. <listitem>
  156. <para>Runs <command>more</command> on gzipped files</para>
  157. <indexterm zone="ch-system-gzip zmore"><primary sortas="b-zmore">zmore</primary></indexterm>
  158. </listitem>
  159. </varlistentry>
  160. <varlistentry id="znew">
  161. <term><command>znew</command></term>
  162. <listitem>
  163. <para>Re-compresses files from <command>compress</command> format to
  164. <command>gzip</command> format&mdash;<filename class="extension">.Z</filename>
  165. to <filename class="extension">.gz</filename></para>
  166. <indexterm zone="ch-system-gzip znew"><primary sortas="b-znew">znew</primary></indexterm>
  167. </listitem>
  168. </varlistentry>
  169. </variablelist>
  170. </sect2>
  171. </sect1>