Next: Tapes, Previous: Advanced usage, Up: Top   [Contents][Index]

5 Environment

The obsolescent environment variable GZIP can hold a set of default options for gzip. These options are interpreted first and can be overwritten by explicit command line parameters. As this can cause problems when using scripts, this feature is supported only for options that are reasonably likely to not cause too much harm, and gzip warns if it is used. This feature will be removed in a future release of gzip.

You can use an alias or script instead. For example, if gzip is in the directory ‘/usr/bin’ you can prepend $HOME/bin to your PATH and create an executable script $HOME/bin/gzip containing the following:

#! /bin/sh
export PATH=/usr/bin
exec gzip -9 "[email protected]"