123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-gzip" role="wrap">
- <?dbhtml filename="gzip.html"?>
- <sect1info condition="script">
- <productname>gzip</productname>
- <productnumber>&gzip-version;</productnumber>
- <address>&gzip-url;</address>
- </sect1info>
- <title>Gzip-&gzip-version;</title>
- <indexterm zone="ch-system-gzip">
- <primary sortas="a-Gzip">Gzip</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <para>Gzip 软件包包含压缩和解压缩文件的程序。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&gzip-ch6-sbu;</seg>
- <seg>&gzip-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 Gzip</title>
- <para>首先,进行 glibc-2.28 要求的一些修补:</para>
- <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
- echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen>
- <para>准备安装 Gzip:</para>
- <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
- <para>编译该软件包:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <para>运行以下命令以测试编译结果:</para>
- <screen><userinput remap="test">make check</userinput></screen>
- <para>已知两个测试可能在 LFS 环境中失败:help-version 和 zmore。</para>
- <para>安装该软件包:</para>
- <screen><userinput remap="install">make install</userinput></screen>
- <para>移动一个必须放置在根文件系统的程序:</para>
- <screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen>
- </sect2>
- <sect2 id="contents-gzip" role="content">
- <title>Gzip 的内容</title>
- <segmentedlist>
- <segtitle>安装的程序</segtitle>
- <seglistitem>
- <seg>gunzip, gzexe, gzip, uncompress (与 gunzip 互为硬链接), zcat, zcmp,
- zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, 以及 znew</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="gunzip">
- <term><command>gunzip</command></term>
- <listitem>
- <para>解压缩 gzip 压缩的文件</para>
- <indexterm zone="ch-system-gzip gunzip">
- <primary sortas="b-gunzip">gunzip</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="gzexe">
- <term><command>gzexe</command></term>
- <listitem>
- <para>创建自解压可执行文件</para>
- <indexterm zone="ch-system-gzip gzexe">
- <primary sortas="b-gzexe">gzexe</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="gzip">
- <term><command>gzip</command></term>
- <listitem>
- <para>使用 Lempel-Ziv (LZ77) 编码压缩文件</para>
- <indexterm zone="ch-system-gzip gzip">
- <primary sortas="b-gzip">gzip</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="uncompress">
- <term><command>uncompress</command></term>
- <listitem>
- <para>解压压缩文件</para>
- <indexterm zone="ch-system-gzip uncompress">
- <primary sortas="b-uncompress">uncompress</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zcat">
- <term><command>zcat</command></term>
- <listitem>
- <para>将给定 gzip 压缩文件解压到标准输出</para>
- <indexterm zone="ch-system-gzip zcat">
- <primary sortas="b-zcat">zcat</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zcmp">
- <term><command>zcmp</command></term>
- <listitem>
- <para>在 gzip 压缩文件上运行 <command>cmp</command></para>
- <indexterm zone="ch-system-gzip zcmp">
- <primary sortas="b-zcmp">zcmp</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zdiff">
- <term><command>zdiff</command></term>
- <listitem>
- <para>在 gzip 压缩文件上运行 <command>diff</command></para>
- <indexterm zone="ch-system-gzip zdiff">
- <primary sortas="b-zdiff">zdiff</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zegrep">
- <term><command>zegrep</command></term>
- <listitem>
- <para>在 gzip 压缩文件上运行 <command>egrep</command></para>
- <indexterm zone="ch-system-gzip zegrep">
- <primary sortas="b-zegrep">zegrep</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zfgrep">
- <term><command>zfgrep</command></term>
- <listitem>
- <para>在 gzip 压缩文件上运行 <command>fgrep</command></para>
- <indexterm zone="ch-system-gzip zfgrep">
- <primary sortas="b-zfgrep">zfgrep</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zforce">
- <term><command>zforce</command></term>
- <listitem>
- <para>为给定所有文件中的 gzip 压缩文件确保
- <filename class="extension">.gz</filename> 扩展名,
- 这样 <command>gzip</command> 就不会重复压缩它们;
- 在文件传输过程中文件名被截断时,这个命令很有用</para>
- <indexterm zone="ch-system-gzip zforce">
- <primary sortas="b-zforce">zforce</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zgrep">
- <term><command>zgrep</command></term>
- <listitem>
- <para>在 gzip 压缩文件上运行 <command>grep</command></para>
- <indexterm zone="ch-system-gzip zgrep">
- <primary sortas="b-zgrep">zgrep</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zless">
- <term><command>zless</command></term>
- <listitem>
- <para>在 gzip 压缩文件上运行 <command>less</command></para>
- <indexterm zone="ch-system-gzip zless">
- <primary sortas="b-zless">zless</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="zmore">
- <term><command>zmore</command></term>
- <listitem>
- <para>在 gzip 压缩文件上运行 <command>more</command></para>
- <indexterm zone="ch-system-gzip zmore">
- <primary sortas="b-zmore">zmore</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="znew">
- <term><command>znew</command></term>
- <listitem>
- <para>将 <command>compress</command> 格式压缩文件重新压缩为
- <command>gzip</command> 格式 —— 转换 <filename
- class="extension">.Z</filename> 文件为 <filename
- class="extension">.gz</filename> 文件</para>
- <indexterm zone="ch-system-gzip znew">
- <primary sortas="b-znew">znew</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|