16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pack — Compress files by Huffman coding<br />

Format<br />

Description<br />

Options<br />

pack [[–][–B] [–f] [–o file] file] ...<br />

Note: The pack utility is fully supported for compatibility with older <strong>UNIX</strong> systems.<br />

However, it is recommended that the compress utility be used instead<br />

because it may provide greater functionality and is considered the standard<br />

for portable <strong>UNIX</strong> applications as defined by P<strong>OS</strong>IX.2 IEEE standard<br />

1003.2-1992.<br />

pack compresses files using a Huffman minimal redundancy code on a byte basis.<br />

Each file is compressed in place; the resulting file has a .z extension appended to<br />

the file name, but keeps the same owner and permissions. For example, abc is<br />

compressed into abc.z. The times of last access and last modification are also<br />

preserved.<br />

Packed files can be identified by file and uncompressed by unpack (which unpacks<br />

the file in place) or pcat (which unpacks to the standard output).<br />

Normally pack reports the degree of compression achieved in each file (the report<br />

is printed on stdout). This number can be negative for small files with little<br />

redundancy if the –f option is used.<br />

pack does not pack files if:<br />

File Tag Specific Options<br />

v The file appears to have already been packed.<br />

v The filename is too long (an error will occur if .z is appended).<br />

v The file has links or is a directory<br />

v The packed file would be larger than the existing file (this includes empty files).<br />

v The destination file already exists, or there is an error in processing.<br />

– Displays more detail on size, overhead and entropy (information rate). If this<br />

option is used several times on the command line it acts as a toggle,<br />

inverting the detailed-report flag at each mention.<br />

–f Forces compression when it normally would not occur. Without this option,<br />

pack does not compress a file if its size is not reduced by compression, the<br />

file is already compressed, or the file has more than one link.<br />

–o file Specifies a different output file so that compressed output is written to file<br />

rather than overwriting the original input file. Several input and output files<br />

may be specified. For example,<br />

pack –o out1 in1 –o out2 in2<br />

packs file in1 into out1 and file in2 into out2. The input files are not<br />

changed.<br />

–B Disable autoconversion of tagged files.<br />

pack<br />

Chapter 2. Shell command descriptions 465

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!