gzip.xml 8.3 KB

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