Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (7229 KB)
pack(1)Name | Synopsis | Description | Options | Operands | Usage | Examples | Environment Variables | Exit Status | Attributes | See Also Name
Synopsispack [-f/] [-] file... pcat file... unpack [-/] file... Description
packThe pack command attempts to store the specified files in a compressed form. Wherever possible (and useful), each input file file is replaced by a packed file file.z with the same access modes, access and modified dates, and owner as those of file. If pack is successful, file is removed. The amount of compression obtained depends on the size of the input file and the character frequency distribution. Because a decoding tree forms the first part of each .z file, it is usually not worthwhile to pack files smaller than three blocks, unless the character frequency distribution is very skewed, which can occur with printer plots or pictures. Typically, text files are reduced to 60-75% of their original size. Load modules, which use a larger character set and have a more uniform distribution of characters, show little compression, the packed versions being about 90% of the original size. The pack utility returns a value that is the number of files that it failed to compress. If that number exceeds 255, 255 is returned. No packing occurs if: The last segment of the file name must be short enough to allow space for the appended .zextension. Directories cannot be compressed. pcatThe pcat command does for packed files what cat(1) does for ordinary files, except that pcat cannot be used as a filter. The specified files are unpacked and written to the standard output. pcat returns the number of files it was unable to unpack. Failure can occur if: unpackThe unpack command expands files created by pack. For each file specified in the command, a search is made for a file called file.z (or just file, if file ends in .z). If this file appears to be a packed file, it is replaced by its expanded version. The new file has the .z suffix stripped from its name, and has the same access modes, access and modification dates, and owner as those of the packed file. unpack returns a value that is the number of files it was unable to unpack. Failure can occur for the same reasons that it can in pcat, as well as for the following: Options
The following options are supported by pack: The following options are supported by pack and unpack: Operands
The following operands are supported: UsageSee largefile(5) for the description of the behavior of pack, pcat, and unpack when encountering files greater than or equal to 2 Gbyte ( 231 bytes). ExamplesExample 1 Viewing a Packed FileTo view a packed file named file.z use: example% pcat file.z or just: example% pcat file Example 2 Making and Unpacked Copy:To make an unpacked copy, say nnn, of a packed file named file.z (without destroying file.z) use the command: example% pcat file >nnn Environment VariablesSee environ(5) for descriptions of the following environment variables that affect the execution of pack, pcat, and unpack: LC_CTYPE, LC_MESSAGES, and NLSPATH. Exit Status
The following exit values are returned: AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoSunOS 5.11 Last Revised 13 Mar 2008Name | Synopsis | Description | Options | Operands | Usage | Examples | Environment Variables | Exit Status | Attributes | See Also |
||||||