?? pack.1
字號:
.TH pack 1.SH Namepack, pcat, unpack \- compress and expand files.SH Syntax.NXR "pack command".B pack[ \fB\-\fR ][ \fB\-f\fR ]\fIname\fR....PP.B pcat\fIname\fR....PP.B unpack.I name....SH DescriptionThe.PN packcommand stores the specified files in a compressed form.Wherever possible (and useful), each input file.I nameis replaced by a packed file.I name.zwith the same access modes, access and modified dates, andowner as those of.I name.The.B \-foption forces packing of.I name.Using this option you can cause an entire directory to be packedeven if some of the files cannot benefit from it.If.PN packis successful,.I nameis removed.Packed filescan be restored to their original form using.PN unpackor.PN pcat ..PPThe.PN packcommand uses Huffman (minimum redundancy) codes on a byte-by-bytebasis.If a hyphen (\-) is used as an argument,an internal flag is set that causes the number of times eachbyte is used, its relative frequency, and the code for the byteto be printed on the standard output.Additional occurrences of a hyphen (\-)in place of.I namecauses the internal flag to be set and reset..PPThe amount of compression obtained depends on the size of theinput file and the character frequency distribution.Because a decodingtree forms the first part of each .z file, it is usually not worthwhileto pack files smaller than three blocks, unless the character frequencydistribution is skewed, which may occur with printer plots or pictures..PPTypically, text files are reduced to 60-75% of their original size.Load modules, which use a larger character set and have a moreuniform distribution of characters, show little compression. Thepacked versions are about 90% of the original size..PPThe.PN packcompress..PPNo packing occurs if one of the following is true:.IP \(bu 5The file appears packed..IP \(buThe file name exceeds 12 characters..IP \(buThe file has links..IP \(buThe file is a directory..IP \(buThe file cannot be opened..IP \(buNo disk storage blocks can be saved by packing..IP \(bu A file called.PN name.zalready exists..IP \(buThe .zfile cannot be created..IP \(bu An I/O error occurred during processing..PPThe last segment of the file name must not exceed 12characters to allow space for the appended .z extension.Directories cannot be compressed..PPThe.PN pcatcommand does for packed files what.MS cat 1does for ordinary files,except that.PN pcatcan not be used as a filter.The specified files are unpacked and written to the standard output.Thus, to view a packed file named name.z use:.EXpcat name.z.EEor just:.EXpcat name.EETo make an unpacked copy, say.I nnn,of a packed file named.PN name.z(without destroying name.z)use the command:.EXpcat name >nnn.EEThe.PN pcatcommandreturns the number of files it was unable to unpack.Failure may occur if:.PP.RSthe file name (exclusive of the.BR .z )has more than 12 characters;.brthe file cannot be opened;.brthe file does not appear to be the output of.I pack..RE.PPThe.PN unpackcommand expands files created by.PN pack .For each file.I namespecified in the command, a search is made for a file called name.z(or just \fIname\fR,if.I nameends in .z).If this file appears to be a packed file, it is replaced byits expanded version.The new file has the .zsuffix stripped from its name, and has the same access modes,access and modification dates, and owner as those of the packed file..PPThe.PN unpackcommand returns a value that is the number of files it was unableto unpack.Failure occurs for the same reasons that it occurs in.PN pcat ,as well as for the following:.PP.RSa file with the unpacked name already exists;.brif the unpacked file cannot be created..PP.REThis command is present only for compatibility. In general, the .MS compress 1command runs faster and gives better compression..SH See Alsocat(1), compress(1)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -