Compressing files with the vxcompress command

You can compress files with the vxcompress command. The vxcompress command performs the following functions:


Command syntax

Compress files or directory trees

vxcompress [-r] file_or_dir ...

Uncompress files or directory trees

vxcompress -u [-r] file_or_dir ...

Report the compression savings in a file or directory tree

vxcompress {-l|-L} [-r] file_or_dir ...

List the supported compression algorithms

vxcompress -a

See the vxcompress(1) manual page.

You can specify one or more filenames. If you specify the -r option, then you can specify directories, and the vxcompress command operates recursively on the directories.

You can specify the file compression algorithm and strength with the vxcompress -t command. The default algorithm is gzip, which is currently the only supported algorithm. The strength is a number from 1 to 9, with a default of 6. Strength 1 gives the fastest performance with least compression, while strength 9 gives the slowest performance with the greatest compression. For example, you specify strength 3 gzip compression as "gzip-3".

When reporting the compression details for a file, the vxcompress -l command or vxcompress -L command displays the following information:

If you attempt to compress a file with the vxcompress command and the extents have data that cannot be compressed, the command still marks the file as compressed and replaces the extents with compressed extent descriptors.

If you recompress a file, you do not need to specify any options with the vxcompress command. The command automatically uses the options that you used to compress the file previously.