Go to the previous, next section.

Creating and Reading Compressed Archives

(This message will disappear, once this node revised.)

`--compress' (`-Z') indicates an archive stored in compressed format. The `--compress' (`-Z') option is useful in saving time over networks and space in pipes, and when storage space is at a premium. `--compress' (`-Z') causes tar to compress when writing the archive, or to uncompress when reading the archive.

To perform compression and uncompression on the archive, tar runs the compress utility. tar uses the default compression parameters; if you need to override them, avoid the `--compress' (`-Z') option and run the compress utility explicitly. It is useful to be able to call the compress utility from within tar because the compress utility by itself cannot access remote tape drives.

The `--compress' (`-Z') option will not work in conjunction with the `--multi-volume' (`-M') option or the `--append' (`-r'), `--update' (`-u'), `--append' (`-r') and `--delete' operations.

FIXME: xref Modifying
, for more information on these operations.

If there is no compress utility available, tar will report an error.

`--compress-blocks' is like `--compress' (`-Z'), but when used in conjunction with `--create' (`-c') also causes tar to pad the last block of the archive out to the next block boundary as it is written. This is useful with certain devices which require all write operations be a multiple of a specific size.

Please Note: The compress program may be covered by a patent, and therefore we recommend you stop using it. We hope to have a different compress program in the future. We may change the name of this option at that time.

When this option is specified, tar will compress (when writing an archive), or uncompress (when reading an archive). Used in conjunction with the `--create' (`-c'), `--extract' (`-x'), `--list' (`-t') and `--compare' (`-d') operations.

`-z -z'
Acts like `--compress' (`-Z'), but pads the archive out to the next block boundary as it is written when used in conjunction with the `--create' (`-c') operation.

FIXME: why not use -Z instead of -z -z ?

Go to the previous, next section.