gzip

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. You can help by expanding it.

gzip is a data compression utility maintained by the GNU project. It is commonly paired with archivers such as tar prior to compression. Therefore, it is common to see files compressed with gzip that end in .gz, .tar.gz and .tgz extensions among others.

Installation

USE flags

USE flags for app-arch/gzip Standard GNU compressor

pic disable optimized assembly code that is not PIC friendly
static !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically

Emerge

root #emerge --ask app-arch/gzip

Usage

Invocation

user $gzip --help
Usage: gzip [OPTION]... [FILE]...
Compress or uncompress FILEs (by default, compress FILES in-place).

Mandatory arguments to long options are mandatory for short options too.

  -c, --stdout      write on standard output, keep original files unchanged
  -d, --decompress  decompress
  -f, --force       force overwrite of output file and compress links
  -h, --help        give this help
  -k, --keep        keep (don't delete) input files
  -l, --list        list compressed file contents
  -L, --license     display software license
  -n, --no-name     do not save or restore the original name and timestamp
  -N, --name        save or restore the original name and timestamp
  -q, --quiet       suppress all warnings
  -r, --recursive   operate recursively on directories
      --rsyncable   make rsync-friendly archive
  -S, --suffix=SUF  use suffix SUF on compressed files
      --synchronous synchronous output (safer if system crashes, but slower)
  -t, --test        test compressed file integrity
  -v, --verbose     verbose mode
  -V, --version     display version number
  -1, --fast        compress faster
  -9, --best        compress better

With no FILE, or when FILE is -, read standard input.

Report bugs to <bug-gzip@gnu.org>.

Removal

Unmerge

root #emerge --ask --depclean --verbose app-arch/gzip

See also

  • Data compression — a list of some of the file compression options available in Gentoo Linux.
  • lha
  • lzip
  • p7zip — a command-line port of 7-Zip for POSIX compliant systems such as Unix, OS X, BeOS, and Amiga.
  • tar — an archiver tool that provides the ability to create tar archives, as well as various other kinds of manipulation.
  • unrar
  • xz
  • zip — provides classic zip compression.

External references