home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / info / gzip.info < prev    next >
Encoding:
GNU Info File  |  1996-10-12  |  34.6 KB  |  798 lines

  1. This is Info file gzip.info, produced by Makeinfo-1.64 from the input
  2. file /ade-src/fsf/gzip/gzip.texi.
  3.  
  4.    This file documents the the GNU `gzip' command for compressing files.
  5.  
  6.    Copyright (C) 1992-1993 Jean-loup Gailly
  7.  
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.  
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided that
  14. the entire resulting derived work is distributed under the terms of a
  15. permission notice identical to this one.
  16.  
  17.    Permission is granted to copy and distribute translations of this
  18. manual into another language, under the above conditions for modified
  19. versions, except that this permission notice may be stated in a
  20. translation approved by the Foundation.
  21.  
  22. 
  23. File: gzip.info,  Node: Top,  Up: (dir)
  24.  
  25.    This file documents the `gzip' command to compress files.
  26.  
  27. * Menu:
  28.  
  29. * Copying::        How you can copy and share `gzip'.
  30. * Overview::        Preliminary information.
  31. * Sample::        Sample output from `gzip'.
  32. * Invoking gzip::    How to run `gzip'.
  33. * Advanced usage::    Concatenated files.
  34. * Environment::        The `GZIP' environment variable
  35. * Tapes::               Using `gzip' on tapes.
  36. * Problems::        Reporting bugs.
  37. * Concept Index::    Index of concepts.
  38.  
  39. 
  40. File: gzip.info,  Node: Copying,  Next: Overview,  Up: Top
  41.  
  42. GNU GENERAL PUBLIC LICENSE
  43. **************************
  44.  
  45.                          Version 2, June 1991
  46.  
  47.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  48.      675 Mass Ave, Cambridge, MA 02139, USA
  49.      
  50.      Everyone is permitted to copy and distribute verbatim copies
  51.      of this license document, but changing it is not allowed.
  52.  
  53. Preamble
  54. ========
  55.  
  56.    The licenses for most software are designed to take away your
  57. freedom to share and change it.  By contrast, the GNU General Public
  58. License is intended to guarantee your freedom to share and change free
  59. software--to make sure the software is free for all its users.  This
  60. General Public License applies to most of the Free Software
  61. Foundation's software and to any other program whose authors commit to
  62. using it.  (Some other Free Software Foundation software is covered by
  63. the GNU Library General Public License instead.)  You can apply it to
  64. your programs, too.
  65.  
  66.    When we speak of free software, we are referring to freedom, not
  67. price.  Our General Public Licenses are designed to make sure that you
  68. have the freedom to distribute copies of free software (and charge for
  69. this service if you wish), that you receive source code or can get it
  70. if you want it, that you can change the software or use pieces of it in
  71. new free programs; and that you know you can do these things.
  72.  
  73.    To protect your rights, we need to make restrictions that forbid
  74. anyone to deny you these rights or to ask you to surrender the rights.
  75. These restrictions translate to certain responsibilities for you if you
  76. distribute copies of the software, or if you modify it.
  77.  
  78.    For example, if you distribute copies of such a program, whether
  79. gratis or for a fee, you must give the recipients all the rights that
  80. you have.  You must make sure that they, too, receive or can get the
  81. source code.  And you must show them these terms so they know their
  82. rights.
  83.  
  84.    We protect your rights with two steps: (1) copyright the software,
  85. and (2) offer you this license which gives you legal permission to copy,
  86. distribute and/or modify the software.
  87.  
  88.    Also, for each author's protection and ours, we want to make certain
  89. that everyone understands that there is no warranty for this free
  90. software.  If the software is modified by someone else and passed on, we
  91. want its recipients to know that what they have is not the original, so
  92. that any problems introduced by others will not reflect on the original
  93. authors' reputations.
  94.  
  95.    Finally, any free program is threatened constantly by software
  96. patents.  We wish to avoid the danger that redistributors of a free
  97. program will individually obtain patent licenses, in effect making the
  98. program proprietary.  To prevent this, we have made it clear that any
  99. patent must be licensed for everyone's free use or not licensed at all.
  100.  
  101.    The precise terms and conditions for copying, distribution and
  102. modification follow.
  103.  
  104.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  105.  
  106.   1. This License applies to any program or other work which contains a
  107.      notice placed by the copyright holder saying it may be distributed
  108.      under the terms of this General Public License.  The "Program",
  109.      below, refers to any such program or work, and a "work based on
  110.      the Program" means either the Program or any derivative work under
  111.      copyright law: that is to say, a work containing the Program or a
  112.      portion of it, either verbatim or with modifications and/or
  113.      translated into another language.  (Hereinafter, translation is
  114.      included without limitation in the term "modification".)  Each
  115.      licensee is addressed as "you".
  116.  
  117.      Activities other than copying, distribution and modification are
  118.      not covered by this License; they are outside its scope.  The act
  119.      of running the Program is not restricted, and the output from the
  120.      Program is covered only if its contents constitute a work based on
  121.      the Program (independent of having been made by running the
  122.      Program).  Whether that is true depends on what the Program does.
  123.  
  124.   2. You may copy and distribute verbatim copies of the Program's
  125.      source code as you receive it, in any medium, provided that you
  126.      conspicuously and appropriately publish on each copy an appropriate
  127.      copyright notice and disclaimer of warranty; keep intact all the
  128.      notices that refer to this License and to the absence of any
  129.      warranty; and give any other recipients of the Program a copy of
  130.      this License along with the Program.
  131.  
  132.      You may charge a fee for the physical act of transferring a copy,
  133.      and you may at your option offer warranty protection in exchange
  134.      for a fee.
  135.  
  136.   3. You may modify your copy or copies of the Program or any portion
  137.      of it, thus forming a work based on the Program, and copy and
  138.      distribute such modifications or work under the terms of Section 1
  139.      above, provided that you also meet all of these conditions:
  140.  
  141.        a. You must cause the modified files to carry prominent notices
  142.           stating that you changed the files and the date of any change.
  143.  
  144.        b. You must cause any work that you distribute or publish, that
  145.           in whole or in part contains or is derived from the Program
  146.           or any part thereof, to be licensed as a whole at no charge
  147.           to all third parties under the terms of this License.
  148.  
  149.        c. If the modified program normally reads commands interactively
  150.           when run, you must cause it, when started running for such
  151.           interactive use in the most ordinary way, to print or display
  152.           an announcement including an appropriate copyright notice and
  153.           a notice that there is no warranty (or else, saying that you
  154.           provide a warranty) and that users may redistribute the
  155.           program under these conditions, and telling the user how to
  156.           view a copy of this License.  (Exception: if the Program
  157.           itself is interactive but does not normally print such an
  158.           announcement, your work based on the Program is not required
  159.           to print an announcement.)
  160.  
  161.      These requirements apply to the modified work as a whole.  If
  162.      identifiable sections of that work are not derived from the
  163.      Program, and can be reasonably considered independent and separate
  164.      works in themselves, then this License, and its terms, do not
  165.      apply to those sections when you distribute them as separate
  166.      works.  But when you distribute the same sections as part of a
  167.      whole which is a work based on the Program, the distribution of
  168.      the whole must be on the terms of this License, whose permissions
  169.      for other licensees extend to the entire whole, and thus to each
  170.      and every part regardless of who wrote it.
  171.  
  172.      Thus, it is not the intent of this section to claim rights or
  173.      contest your rights to work written entirely by you; rather, the
  174.      intent is to exercise the right to control the distribution of
  175.      derivative or collective works based on the Program.
  176.  
  177.      In addition, mere aggregation of another work not based on the
  178.      Program with the Program (or with a work based on the Program) on
  179.      a volume of a storage or distribution medium does not bring the
  180.      other work under the scope of this License.
  181.  
  182.   4. You may copy and distribute the Program (or a work based on it,
  183.      under Section 2) in object code or executable form under the terms
  184.      of Sections 1 and 2 above provided that you also do one of the
  185.      following:
  186.  
  187.        a. Accompany it with the complete corresponding machine-readable
  188.           source code, which must be distributed under the terms of
  189.           Sections 1 and 2 above on a medium customarily used for
  190.           software interchange; or,
  191.  
  192.        b. Accompany it with a written offer, valid for at least three
  193.           years, to give any third party, for a charge no more than your
  194.           cost of physically performing source distribution, a complete
  195.           machine-readable copy of the corresponding source code, to be
  196.           distributed under the terms of Sections 1 and 2 above on a
  197.           medium customarily used for software interchange; or,
  198.  
  199.        c. Accompany it with the information you received as to the offer
  200.           to distribute corresponding source code.  (This alternative is
  201.           allowed only for noncommercial distribution and only if you
  202.           received the program in object code or executable form with
  203.           such an offer, in accord with Subsection b above.)
  204.  
  205.      The source code for a work means the preferred form of the work for
  206.      making modifications to it.  For an executable work, complete
  207.      source code means all the source code for all modules it contains,
  208.      plus any associated interface definition files, plus the scripts
  209.      used to control compilation and installation of the executable.
  210.      However, as a special exception, the source code distributed need
  211.      not include anything that is normally distributed (in either
  212.      source or binary form) with the major components (compiler,
  213.      kernel, and so on) of the operating system on which the executable
  214.      runs, unless that component itself accompanies the executable.
  215.  
  216.      If distribution of executable or object code is made by offering
  217.      access to copy from a designated place, then offering equivalent
  218.      access to copy the source code from the same place counts as
  219.      distribution of the source code, even though third parties are not
  220.      compelled to copy the source along with the object code.
  221.  
  222.   5. You may not copy, modify, sublicense, or distribute the Program
  223.      except as expressly provided under this License.  Any attempt
  224.      otherwise to copy, modify, sublicense or distribute the Program is
  225.      void, and will automatically terminate your rights under this
  226.      License.  However, parties who have received copies, or rights,
  227.      from you under this License will not have their licenses
  228.      terminated so long as such parties remain in full compliance.
  229.  
  230.   6. You are not required to accept this License, since you have not
  231.      signed it.  However, nothing else grants you permission to modify
  232.      or distribute the Program or its derivative works.  These actions
  233.      are prohibited by law if you do not accept this License.
  234.      Therefore, by modifying or distributing the Program (or any work
  235.      based on the Program), you indicate your acceptance of this
  236.      License to do so, and all its terms and conditions for copying,
  237.      distributing or modifying the Program or works based on it.
  238.  
  239.   7. Each time you redistribute the Program (or any work based on the
  240.      Program), the recipient automatically receives a license from the
  241.      original licensor to copy, distribute or modify the Program
  242.      subject to these terms and conditions.  You may not impose any
  243.      further restrictions on the recipients' exercise of the rights
  244.      granted herein.  You are not responsible for enforcing compliance
  245.      by third parties to this License.
  246.  
  247.   8. If, as a consequence of a court judgment or allegation of patent
  248.      infringement or for any other reason (not limited to patent
  249.      issues), conditions are imposed on you (whether by court order,
  250.      agreement or otherwise) that contradict the conditions of this
  251.      License, they do not excuse you from the conditions of this
  252.      License.  If you cannot distribute so as to satisfy simultaneously
  253.      your obligations under this License and any other pertinent
  254.      obligations, then as a consequence you may not distribute the
  255.      Program at all.  For example, if a patent license would not permit
  256.      royalty-free redistribution of the Program by all those who
  257.      receive copies directly or indirectly through you, then the only
  258.      way you could satisfy both it and this License would be to refrain
  259.      entirely from distribution of the Program.
  260.  
  261.      If any portion of this section is held invalid or unenforceable
  262.      under any particular circumstance, the balance of the section is
  263.      intended to apply and the section as a whole is intended to apply
  264.      in other circumstances.
  265.  
  266.      It is not the purpose of this section to induce you to infringe any
  267.      patents or other property right claims or to contest validity of
  268.      any such claims; this section has the sole purpose of protecting
  269.      the integrity of the free software distribution system, which is
  270.      implemented by public license practices.  Many people have made
  271.      generous contributions to the wide range of software distributed
  272.      through that system in reliance on consistent application of that
  273.      system; it is up to the author/donor to decide if he or she is
  274.      willing to distribute software through any other system and a
  275.      licensee cannot impose that choice.
  276.  
  277.      This section is intended to make thoroughly clear what is believed
  278.      to be a consequence of the rest of this License.
  279.  
  280.   9. If the distribution and/or use of the Program is restricted in
  281.      certain countries either by patents or by copyrighted interfaces,
  282.      the original copyright holder who places the Program under this
  283.      License may add an explicit geographical distribution limitation
  284.      excluding those countries, so that distribution is permitted only
  285.      in or among countries not thus excluded.  In such case, this
  286.      License incorporates the limitation as if written in the body of
  287.      this License.
  288.  
  289.  10. The Free Software Foundation may publish revised and/or new
  290.      versions of the General Public License from time to time.  Such
  291.      new versions will be similar in spirit to the present version, but
  292.      may differ in detail to address new problems or concerns.
  293.  
  294.      Each version is given a distinguishing version number.  If the
  295.      Program specifies a version number of this License which applies
  296.      to it and "any later version", you have the option of following
  297.      the terms and conditions either of that version or of any later
  298.      version published by the Free Software Foundation.  If the Program
  299.      does not specify a version number of this License, you may choose
  300.      any version ever published by the Free Software Foundation.
  301.  
  302.  11. If you wish to incorporate parts of the Program into other free
  303.      programs whose distribution conditions are different, write to the
  304.      author to ask for permission.  For software which is copyrighted
  305.      by the Free Software Foundation, write to the Free Software
  306.      Foundation; we sometimes make exceptions for this.  Our decision
  307.      will be guided by the two goals of preserving the free status of
  308.      all derivatives of our free software and of promoting the sharing
  309.      and reuse of software generally.
  310.  
  311.                                 NO WARRANTY
  312.  
  313.  12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  314.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  315.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  316.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  317.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  318.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  319.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  320.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  321.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  322.      SERVICING, REPAIR OR CORRECTION.
  323.  
  324.  13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  325.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  326.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  327.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  328.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  329.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  330.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  331.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  332.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  333.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  334.  
  335.                       END OF TERMS AND CONDITIONS
  336.  
  337. How to Apply These Terms to Your New Programs
  338. =============================================
  339.  
  340.    If you develop a new program, and you want it to be of the greatest
  341. possible use to the public, the best way to achieve this is to make it
  342. free software which everyone can redistribute and change under these
  343. terms.
  344.  
  345.    To do so, attach the following notices to the program.  It is safest
  346. to attach them to the start of each source file to most effectively
  347. convey the exclusion of warranty; and each file should have at least
  348. the "copyright" line and a pointer to where the full notice is found.
  349.  
  350.      ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES.
  351.      Copyright (C) 19YY  NAME OF AUTHOR
  352.      
  353.      This program is free software; you can redistribute it and/or
  354.      modify it under the terms of the GNU General Public License
  355.      as published by the Free Software Foundation; either version 2
  356.      of the License, or (at your option) any later version.
  357.      
  358.      This program is distributed in the hope that it will be useful,
  359.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  360.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  361.      GNU General Public License for more details.
  362.      
  363.      You should have received a copy of the GNU General Public License
  364.      along with this program; if not, write to the Free Software
  365.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  366.  
  367.    Also add information on how to contact you by electronic and paper
  368. mail.
  369.  
  370.    If the program is interactive, make it output a short notice like
  371. this when it starts in an interactive mode:
  372.  
  373.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  374.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  375.      type `show w'.  This is free software, and you are welcome
  376.      to redistribute it under certain conditions; type `show c'
  377.      for details.
  378.  
  379.    The hypothetical commands `show w' and `show c' should show the
  380. appropriate parts of the General Public License.  Of course, the
  381. commands you use may be called something other than `show w' and `show
  382. c'; they could even be mouse-clicks or menu items--whatever suits your
  383. program.
  384.  
  385.    You should also get your employer (if you work as a programmer) or
  386. your school, if any, to sign a "copyright disclaimer" for the program,
  387. if necessary.  Here is a sample; alter the names:
  388.  
  389.      Yoyodyne, Inc., hereby disclaims all copyright
  390.      interest in the program `Gnomovision'
  391.      (which makes passes at compilers) written
  392.      by James Hacker.
  393.      
  394.      SIGNATURE OF TY COON, 1 April 1989
  395.      Ty Coon, President of Vice
  396.  
  397.    This General Public License does not permit incorporating your
  398. program into proprietary programs.  If your program is a subroutine
  399. library, you may consider it more useful to permit linking proprietary
  400. applications with the library.  If this is what you want to do, use the
  401. GNU Library General Public License instead of this License.
  402.  
  403. 
  404. File: gzip.info,  Node: Overview,  Next: Sample,  Prev: Copying,  Up: Top
  405.  
  406. Overview
  407. ********
  408.  
  409.    `gzip' reduces the size of the named files using Lempel-Ziv coding
  410. (LZ77).  Whenever possible, each file is replaced by one with the
  411. extension `.gz', while keeping the same ownership modes, access and
  412. modification times.  (The default extension is `-gz' for VMS, `z' for
  413. MSDOS, OS/2 FAT and Atari.)  If no files are specified or if a file
  414. name is "-", the standard input is compressed to the standard output.
  415. `gzip' will only attempt to compress regular files.  In particular, it
  416. will ignore symbolic links.
  417.  
  418.    If the new file name is too long for its file system, `gzip'
  419. truncates it.  `gzip' attempts to truncate only the parts of the file
  420. name longer than 3 characters.  (A part is delimited by dots.) If the
  421. name consists of small parts only, the longest parts are truncated.
  422. For example, if file names are limited to 14 characters, gzip.msdos.exe
  423. is compressed to gzi.msd.exe.gz.  Names are not truncated on systems
  424. which do not have a limit on file name length.
  425.  
  426.    By default, `gzip' keeps the original file name and timestamp in the
  427. compressed file. These are used when decompressing the file with the
  428. `-N' option. This is useful when the compressed file name was truncated
  429. or when the time stamp was not preserved after a file transfer.
  430.  
  431.    Compressed files can be restored to their original form using `gzip
  432. -d' or `gunzip' or `zcat'.  If the original name saved in the
  433. compressed file is not suitable for its file system, a new name is
  434. constructed from the original one to make it legal.
  435.  
  436.    `gunzip' takes a list of files on its command line and replaces each
  437. file whose name ends with `.gz', `.z', `.Z', `-gz', `-z' or `_z' and
  438. which begins with the correct magic number with an uncompressed file
  439. without the original extension.  `gunzip' also recognizes the special
  440. extensions `.tgz' and `.taz' as shorthands for `.tar.gz' and `.tar.Z'
  441. respectively. When compressing, `gzip' uses the `.tgz' extension if
  442. necessary instead of truncating a file with a `.tar' extension.
  443.  
  444.    `gunzip' can currently decompress files created by `gzip', `zip',
  445. `compress' or `pack'. The detection of the input format is automatic.
  446. When using the first two formats, `gunzip' checks a 32 bit CRC (cyclic
  447. redundancy check). For `pack', `gunzip' checks the uncompressed length.
  448. The `compress' format was not designed to allow consistency checks.
  449. However `gunzip' is sometimes able to detect a bad `.Z' file. If you
  450. get an error when uncompressing a `.Z' file, do not assume that the
  451. `.Z' file is correct simply because the standard `uncompress' does not
  452. complain.  This generally means that the standard `uncompress' does not
  453. check its input, and happily generates garbage output.  The SCO
  454. `compress -H' format (`lzh' compression method) does not include a CRC
  455. but also allows some consistency checks.
  456.  
  457.    Files created by `zip' can be uncompressed by `gzip' only if they
  458. have a single member compressed with the 'deflation' method. This
  459. feature is only intended to help conversion of `tar.zip' files to the
  460. `tar.gz' format. To extract `zip' files with several members, use
  461. `unzip' instead of `gunzip'.
  462.  
  463.    `zcat' is identical to `gunzip -c'.  `zcat' uncompresses either a
  464. list of files on the command line or its standard input and writes the
  465. uncompressed data on standard output.  `zcat' will uncompress files
  466. that have the correct magic number whether they have a `.gz' suffix or
  467. not.
  468.  
  469.    `gzip' uses the Lempel-Ziv algorithm used in `zip' and PKZIP.  The
  470. amount of compression obtained depends on the size of the input and the
  471. distribution of common substrings.  Typically, text such as source code
  472. or English is reduced by 60-70%.  Compression is generally much better
  473. than that achieved by LZW (as used in `compress'), Huffman coding (as
  474. used in `pack'), or adaptive Huffman coding (`compact').
  475.  
  476.    Compression is always performed, even if the compressed file is
  477. slightly larger than the original. The worst case expansion is a few
  478. bytes for the `gzip' file header, plus 5 bytes every 32K block, or an
  479. expansion ratio of 0.015% for large files. Note that the actual number
  480. of used disk blocks almost never increases. `gzip' preserves the mode,
  481. ownership and timestamps of files when compressing or decompressing.
  482.  
  483. 
  484. File: gzip.info,  Node: Sample,  Next: Invoking gzip,  Prev: Overview,  Up: Top
  485.  
  486. Sample Output
  487. *************
  488.  
  489.    Here are some realistic examples of running `gzip'.
  490.  
  491.    This is the output of the command `gzip -h':
  492.  
  493.      gzip 1.2.4 (18 Aug 93)
  494.      usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
  495.       -c --stdout      write on standard output, keep original files unchanged
  496.       -d --decompress  decompress
  497.       -f --force       force overwrite of output file and compress links
  498.       -h --help        give this help
  499.       -l --list        list compressed file contents
  500.       -L --license     display software license
  501.       -n --no-name     do not save or restore the original name and time stamp
  502.       -N --name        save or restore the original name and time stamp
  503.       -q --quiet       suppress all warnings
  504.       -r --recursive   operate recursively on directories
  505.       -S .suf  --suffix .suf     use suffix .suf on compressed files
  506.       -t --test        test compressed file integrity
  507.       -v --verbose     verbose mode
  508.       -V --version     display version number
  509.       -1 --fast        compress faster
  510.       -9 --best        compress better
  511.       file...          files to (de)compress. If none given, use standard input.
  512.  
  513.    This is the output of the command `gzip -v texinfo.tex':
  514.  
  515.      texinfo.tex:             71.6% -- replaced with texinfo.tex.gz
  516.  
  517.    The following command will find all `gzip' files in the current
  518. directory and subdirectories, and extract them in place without
  519. destroying the original:
  520.  
  521.      find . -name '*.gz' -print | sed 's/^\(.*\)[.]gz$/gunzip < "&" > "\1"/' | sh
  522.  
  523. 
  524. File: gzip.info,  Node: Invoking gzip,  Next: Advanced usage,  Prev: Sample,  Up: Top
  525.  
  526. Invoking `gzip'
  527. ***************
  528.  
  529.    The format for running the `gzip' program is:
  530.  
  531.      gzip OPTION ...
  532.  
  533.    `gzip' supports the following options:
  534.  
  535. `--stdout'
  536. `--to-stdout'
  537. `-c'
  538.      Write output on standard output; keep original files unchanged.
  539.      If there are several input files, the output consists of a
  540.      sequence of independently compressed members. To obtain better
  541.      compression, concatenate all input files before compressing them.
  542.  
  543. `--decompress'
  544. `--uncompress'
  545. `-d'
  546.      Decompress.
  547.  
  548. `--force'
  549. `-f'
  550.      Force compression or decompression even if the file has multiple
  551.      links or the corresponding file already exists, or if the
  552.      compressed data is read from or written to a terminal. If the
  553.      input data is not in a format recognized by `gzip', and if the
  554.      option -stdout is also given, copy the input data without change
  555.      to the standard ouput: let `zcat' behave as `cat'. If `-f' is not
  556.      given, and when not running in the background, `gzip' prompts to
  557.      verify whether an existing file should be overwritten.
  558.  
  559. `--help'
  560. `-h'
  561.      Print an informative help message describing the options then quit.
  562.  
  563. `--list'
  564. `-l'
  565.      For each compressed file, list the following fields:
  566.  
  567.           compressed size: size of the compressed file
  568.           uncompressed size: size of the uncompressed file
  569.           ratio: compression ratio (0.0% if unknown)
  570.           uncompressed_name: name of the uncompressed file
  571.  
  572.      The uncompressed size is given as `-1' for files not in `gzip'
  573.      format, such as compressed `.Z' files. To get the uncompressed
  574.      size for such a file, you can use:
  575.  
  576.           zcat file.Z | wc -c
  577.  
  578.      In combination with the -verbose option, the following fields are
  579.      also displayed:
  580.  
  581.           method: compression method (deflate,compress,lzh,pack)
  582.           crc: the 32-bit CRC of the uncompressed data
  583.           date & time: time stamp for the uncompressed file
  584.  
  585.      The crc is given as ffffffff for a file not in gzip format.
  586.  
  587.      With -verbose, the size totals and compression ratio for all files
  588.      is also displayed, unless some sizes are unknown. With -quiet, the
  589.      title and totals lines are not displayed.
  590.  
  591. `--license'
  592. `-L'
  593.      Display the `gzip' license then quit.
  594.  
  595. `--no-name'
  596. `-n'
  597.      When compressing, do not save the original file name and time
  598.      stamp by default. (The original name is always saved if the name
  599.      had to be truncated.) When decompressing, do not restore the
  600.      original file name if present (remove only the `gzip' suffix from
  601.      the compressed file name) and do not restore the original time
  602.      stamp if present (copy it from the compressed file). This option
  603.      is the default when decompressing.
  604.  
  605. `--name'
  606. `-N'
  607.      When compressing, always save the original file name and time
  608.      stamp; this is the default. When decompressing, restore the
  609.      original file name and time stamp if present. This option is
  610.      useful on systems which have a limit on file name length or when
  611.      the time stamp has been lost after a file transfer.
  612.  
  613. `--quiet'
  614. `-q'
  615.      Suppress all warning messages.
  616.  
  617. `--recursive'
  618. `-r'
  619.      Travel the directory structure recursively. If any of the file
  620.      names specified on the command line are directories, `gzip' will
  621.      descend into the directory and compress all the files it finds
  622.      there (or decompress them in the case of `gunzip').
  623.  
  624. `--suffix SUF'
  625. `-S SUF'
  626.      Use suffix `SUF' instead of `.gz'. Any suffix can be given, but
  627.      suffixes other than `.z' and `.gz' should be avoided to avoid
  628.      confusion when files are transferred to other systems.  A null
  629.      suffix forces gunzip to try decompression on all given files
  630.      regardless of suffix, as in:
  631.  
  632.           gunzip -S "" *        (*.* for MSDOS)
  633.  
  634.      Previous versions of gzip used the `.z' suffix. This was changed to
  635.      avoid a conflict with `pack'.
  636.  
  637. `--test'
  638. `-t'
  639.      Test. Check the compressed file integrity.
  640.  
  641. `--verbose'
  642. `-v'
  643.      Verbose. Display the name and percentage reduction for each file
  644.      compressed.
  645.  
  646. `--version'
  647. `-V'
  648.      Version. Display the version number and compilation options, then
  649.      quit.
  650.  
  651. `--fast'
  652. `--best'
  653. `-N'
  654.      Regulate the speed of compression using the specified digit N,
  655.      where `-1' or `--fast' indicates the fastest compression method
  656.      (less compression) and `--best' or `-9' indicates the slowest
  657.      compression method (optimal compression).  The default compression
  658.      level is `-6' (that is, biased towards high compression at expense
  659.      of speed).
  660.  
  661. 
  662. File: gzip.info,  Node: Advanced usage,  Next: Environment,  Prev: Invoking gzip,  Up: Top
  663.  
  664. Advanced usage
  665. **************
  666.  
  667.    Multiple compressed files can be concatenated. In this case,
  668. `gunzip' will extract all members at once. If one member is damaged,
  669. other members might still be recovered after removal of the damaged
  670. member. Better compression can be usually obtained if all members are
  671. decompressed and then recompressed in a single step.
  672.  
  673.    This is an example of concatenating `gzip' files:
  674.  
  675.      gzip -c file1  > foo.gz
  676.      gzip -c file2 >> foo.gz
  677.  
  678.    Then
  679.  
  680.      gunzip -c foo
  681.  
  682.    is equivalent to
  683.  
  684.      cat file1 file2
  685.  
  686.    In case of damage to one member of a `.gz' file, other members can
  687. still be recovered (if the damaged member is removed). However, you can
  688. get better compression by compressing all members at once:
  689.  
  690.      cat file1 file2 | gzip > foo.gz
  691.  
  692.    compresses better than
  693.  
  694.      gzip -c file1 file2 > foo.gz
  695.  
  696.    If you want to recompress concatenated files to get better
  697. compression, do:
  698.  
  699.      zcat old.gz | gzip > new.gz
  700.  
  701.    If a compressed file consists of several members, the uncompressed
  702. size and CRC reported by the `--list' option applies to the last member
  703. only. If you need the uncompressed size for all members, you can use:
  704.  
  705.      zcat file.gz | wc -c
  706.  
  707.    If you wish to create a single archive file with multiple members so
  708. that members can later be extracted independently, use an archiver such
  709. as `tar' or `zip'. GNU `tar' supports the `-z' option to invoke `gzip'
  710. transparently. `gzip' is designed as a complement to `tar', not as a
  711. replacement.
  712.  
  713. 
  714. File: gzip.info,  Node: Environment,  Next: Tapes,  Prev: Advanced usage,  Up: Top
  715.  
  716. Environment
  717. ***********
  718.  
  719.    The environment variable `GZIP' can hold a set of default options for
  720. `gzip'.  These options are interpreted first and can be overwritten by
  721. explicit command line parameters.  For example:
  722.  
  723.      for sh:    GZIP="-8v --name"; export GZIP
  724.      for csh:   setenv GZIP "-8v --name"
  725.      for MSDOS: set GZIP=-8v --name
  726.  
  727.    On Vax/VMS, the name of the environment variable is `GZIP_OPT', to
  728. avoid a conflict with the symbol set for invocation of the program.
  729.  
  730. 
  731. File: gzip.info,  Node: Tapes,  Next: Problems,  Prev: Environment,  Up: Top
  732.  
  733. Using `gzip' on tapes
  734. *********************
  735.  
  736.    When writing compressed data to a tape, it is generally necessary to
  737. pad the output with zeroes up to a block boundary. When the data is
  738. read and the whole block is passed to `gunzip' for decompression,
  739. `gunzip' detects that there is extra trailing garbage after the
  740. compressed data and emits a warning by default. You have to use the
  741. `--quiet' option to suppress the warning. This option can be set in the
  742. `GZIP' environment variable, as in:
  743.  
  744.      for sh:    GZIP="-q"  tar -xfz --block-compress /dev/rst0
  745.      for csh:   (setenv GZIP "-q"; tar -xfz --block-compress /dev/rst0)
  746.  
  747.    In the above example, `gzip' is invoked implicitly by the `-z'
  748. option of GNU `tar'.  Make sure that the same block size (`-b' option
  749. of `tar') is used for reading and writing compressed data on tapes.
  750. (This example assumes you are using the GNU version of `tar'.)
  751.  
  752. 
  753. File: gzip.info,  Node: Problems,  Next: Concept Index,  Prev: Tapes,  Up: Top
  754.  
  755. Reporting Bugs
  756. **************
  757.  
  758.    If you find a bug in `gzip', please send electronic mail to
  759. `jloup@chorus.fr' or, if this fails, to
  760. `bug-gnu-utils@prep.ai.mit.edu'.  Include the version number, which you
  761. can find by running `gzip -V'.  Also include in your message the
  762. hardware and operating system, the compiler used to compile `gzip', a
  763. description of the bug behavior, and the input to `gzip' that triggered
  764. the bug.
  765.  
  766. 
  767. File: gzip.info,  Node: Concept Index,  Prev: Problems,  Up: Top
  768.  
  769. Concept Index
  770. *************
  771.  
  772. * Menu:
  773.  
  774. * bugs:                                 Problems.
  775. * concatenated files:                   Advanced usage.
  776. * Environment:                          Environment.
  777. * invoking:                             Invoking gzip.
  778. * options:                              Invoking gzip.
  779. * overview:                             Overview.
  780. * sample:                               Sample.
  781. * tapes:                                Tapes.
  782.  
  783.  
  784. 
  785. Tag Table:
  786. Node: Top884
  787. Node: Copying1364
  788. Node: Overview20503
  789. Node: Sample24810
  790. Node: Invoking gzip26427
  791. Node: Advanced usage31052
  792. Node: Environment32641
  793. Node: Tapes33209
  794. Node: Problems34185
  795. Node: Concept Index34690
  796. 
  797. End Tag Table
  798.