⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manual_2.html

📁 bzip2是一个免费的
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<HTML><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><!-- Created on January, 5  2002 by texi2html 1.64 --><!-- Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)            Karl Berry  <karl@freefriends.org>            Olaf Bachmann <obachman@mathematik.uni-kl.de>            and many others.Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> --><HEAD><TITLE>Untitled Document: 2. How to use <CODE>bzip2</CODE></TITLE><META NAME="description" CONTENT="Untitled Document: 2. How to use <CODE>bzip2</CODE>"><META NAME="keywords" CONTENT="Untitled Document: 2. How to use <CODE>bzip2</CODE>"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META NAME="Generator" CONTENT="texi2html 1.64"></HEAD><BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"><A NAME="SEC2"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_1.html#SEC1"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC3"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD></TR></TABLE><H1> 2. How to use <CODE>bzip2</CODE> </H1><!--docid::SEC2::--><P>This chapter contains a copy of the <CODE>bzip2</CODE> man page,and nothing else.</P><P><BLOCKQUOTE><P><HR SIZE="6"><A NAME="SEC3"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC2"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC4"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD></TR></TABLE><H4> NAME </H4><!--docid::SEC3::--><UL><LI><CODE>bzip2</CODE>, <CODE>bunzip2</CODE>- a block-sorting file compressor, v1.0.2<LI><CODE>bzcat</CODE>- decompresses files to stdout<LI><CODE>bzip2recover</CODE>- recovers data from damaged bzip2 files</UL><P><HR SIZE="6"><A NAME="SEC4"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC3"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC5"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD></TR></TABLE><H4> SYNOPSIS </H4><!--docid::SEC4::--><UL><LI><CODE>bzip2</CODE> [ -cdfkqstvzVL123456789 ] [ filenames ...  ]<LI><CODE>bunzip2</CODE> [ -fkvsVL ] [ filenames ...  ]<LI><CODE>bzcat</CODE> [ -s ] [ filenames ...  ]<LI><CODE>bzip2recover</CODE> filename</UL><P><HR SIZE="6"><A NAME="SEC5"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC4"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC6"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD></TR></TABLE><H4> DESCRIPTION </H4><!--docid::SEC5::--><P><CODE>bzip2</CODE> compresses files using the Burrows-Wheeler block sortingtext compression algorithm, and Huffman coding.  Compression isgenerally considerably better than that achieved by more conventionalLZ77/LZ78-based compressors, and approaches the performance of the PPMfamily of statistical compressors.</P><P>The command-line options are deliberately very similar to those of GNU<CODE>gzip</CODE>, but they are not identical.</P><P><CODE>bzip2</CODE> expects a list of file names to accompany the command-lineflags.  Each file is replaced by a compressed version of itself, withthe name <CODE>original_name.bz2</CODE>.  Each compressed file has the samemodification date, permissions, and, when possible, ownership as thecorresponding original, so that these properties can be correctlyrestored at decompression time.  File name handling is naive in thesense that there is no mechanism for preserving original file names,permissions, ownerships or dates in filesystems which lack theseconcepts, or have serious file name length restrictions, such as MS-DOS.</P><P><CODE>bzip2</CODE> and <CODE>bunzip2</CODE> will by default not overwrite existingfiles.  If you want this to happen, specify the <CODE>-f</CODE> flag.</P><P>If no file names are specified, <CODE>bzip2</CODE> compresses from standardinput to standard output.  In this case, <CODE>bzip2</CODE> will decline towrite compressed output to a terminal, as this would be entirelyincomprehensible and therefore pointless.</P><P><CODE>bunzip2</CODE> (or <CODE>bzip2 -d</CODE>) decompresses allspecified files.  Files which were not created by <CODE>bzip2</CODE>will be detected and ignored, and a warning issued.  <CODE>bzip2</CODE> attempts to guess the filename for the decompressed file from that of the compressed file as follows:<UL><LI><CODE>filename.bz2 </CODE> becomes <CODE>filename</CODE><LI><CODE>filename.bz  </CODE> becomes <CODE>filename</CODE><LI><CODE>filename.tbz2</CODE> becomes <CODE>filename.tar</CODE><LI><CODE>filename.tbz </CODE> becomes <CODE>filename.tar</CODE><LI><CODE>anyothername </CODE> becomes <CODE>anyothername.out</CODE></UL>If the file does not end in one of the recognised endings, <CODE>.bz2</CODE>, <CODE>.bz</CODE>, <CODE>.tbz2</CODE> or <CODE>.tbz</CODE>, <CODE>bzip2</CODE> complains that it cannotguess the name of the original file, and uses the original namewith <CODE>.out</CODE> appended.<P>As with compression, supplying nofilenames causes decompression from standard input to standard output.</P><P><CODE>bunzip2</CODE> will correctly decompress a file which is theconcatenation of two or more compressed files.  The result is theconcatenation of the corresponding uncompressed files.  Integritytesting (<CODE>-t</CODE>) of concatenated compressed files is also supported.</P><P>You can also compress or decompress files to the standard output bygiving the <CODE>-c</CODE> flag.  Multiple files may be compressed anddecompressed like this.  The resulting outputs are fed sequentially tostdout.  Compression of multiple files in this manner generates a streamcontaining multiple compressed file representations.  Such a streamcan be decompressed correctly only by <CODE>bzip2</CODE> version 0.9.0 orlater.  Earlier versions of <CODE>bzip2</CODE> will stop after decompressingthe first file in the stream.</P><P><CODE>bzcat</CODE> (or <CODE>bzip2 -dc</CODE>) decompresses all specified files tothe standard output.</P><P><CODE>bzip2</CODE> will read arguments from the environment variables<CODE>BZIP2</CODE> and <CODE>BZIP</CODE>, in that order, and will process thembefore any arguments read from the command line.  This gives a convenient way to supply default arguments.</P><P>Compression is always performed, even if the compressed file is slightlylarger than the original.  Files of less than about one hundred bytestend to get larger, since the compression mechanism has a constantoverhead in the region of 50 bytes.  Random data (including the outputof most file compressors) is coded at about 8.05 bits per byte, givingan expansion of around 0.5%.</P><P>As a self-check for your protection, <CODE>bzip2</CODE> uses 32-bit CRCs tomake sure that the decompressed version of a file is identical to theoriginal.  This guards against corruption of the compressed data, andagainst undetected bugs in <CODE>bzip2</CODE> (hopefully very unlikely).  Thechances of data corruption going undetected is microscopic, about onechance in four billion for each file processed.  Be aware, though, thatthe check occurs upon decompression, so it can only tell you thatsomething is wrong.  It can't help you recover the original uncompresseddata.  You can use <CODE>bzip2recover</CODE> to try to recover data fromdamaged files.</P><P>Return values: 0 for a normal exit, 1 for environmental problems (filenot found, invalid flags, I/O errors, &#38;c), 2 to indicate a corruptcompressed file, 3 for an internal consistency error (eg, bug) whichcaused <CODE>bzip2</CODE> to panic.</P><P><HR SIZE="6"><A NAME="SEC6"></A><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC5"> &lt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_2.html#SEC7"> &gt; </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top"> Up </A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual.html#SEC_Top">Top</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD></TR></TABLE><H4> OPTIONS </H4><!--docid::SEC6::--><DL COMPACT><DT><CODE>-c  --stdout</CODE><DD>Compress or decompress to standard output.<DT><CODE>-d  --decompress</CODE><DD>Force decompression.  <CODE>bzip2</CODE>, <CODE>bunzip2</CODE> and <CODE>bzcat</CODE> arereally the same program, and the decision about what actions to take isdone on the basis of which name is used.  This flag overrides thatmechanism, and forces bzip2 to decompress.<DT><CODE>-z --compress</CODE><DD>The complement to <CODE>-d</CODE>: forces compression, regardless of theinvokation name.<DT><CODE>-t --test</CODE><DD>Check integrity of the specified file(s), but don't decompress them.This really performs a trial decompression and throws away the result.<DT><CODE>-f --force</CODE><DD>Force overwrite of output files.  Normally, <CODE>bzip2</CODE> will not overwriteexisting output files.  Also forces <CODE>bzip2</CODE> to break hard linksto files, which it otherwise wouldn't do.<P><CODE>bzip2</CODE> normally declines to decompress files which don't have thecorrect magic header bytes.  If forced (<CODE>-f</CODE>), however, it willpass such files through unmodified.  This is how GNU <CODE>gzip</CODE>behaves.<DT><CODE>-k --keep</CODE><DD>Keep (don't delete) input files during compressionor decompression.<DT><CODE>-s --small</CODE><DD>Reduce memory usage, for compression, decompression and testing.  Filesare decompressed and tested using a modified algorithm which onlyrequires 2.5 bytes per block byte.  This means any file can bedecompressed in 2300k of memory, albeit at about half the normal speed.<P>During compression, <CODE>-s</CODE> selects a block size of 200k, which limitsmemory use to around the same figure, at the expense of your compressionratio.  In short, if your machine is low on memory (8 megabytes orless), use -s for everything.  See MEMORY MANAGEMENT below.<DT><CODE>-q --quiet</CODE><DD>Suppress non-essential warning messages.  Messages pertaining toI/O errors and other critical events will not be suppressed.<DT><CODE>-v --verbose</CODE><DD>Verbose mode -- show the compression ratio for each file processed.Further <CODE>-v</CODE>'s increase the verbosity level, spewing out lots ofinformation which is primarily of interest for diagnostic purposes.<DT><CODE>-L --license -V --version</CODE><DD>Display the software version, license terms and conditions.<DT><CODE>-1 (or --fast) to -9 (or --best)</CODE><DD>Set the block size to 100 k, 200 k ..  900 k when compressing.  Has noeffect when decompressing.  See MEMORY MANAGEMENT below.The <CODE>--fast</CODE> and <CODE>--best</CODE> aliases are primarily for GNU<CODE>gzip</CODE> compatibility.  In particular, <CODE>--fast</CODE> doesn't makethings significantly faster.  And <CODE>--best</CODE> merely selects thedefault behaviour.<DT><CODE>--</CODE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -