Print this page
12284 errors in compress(1) and pack(1) man pages
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/pack.1.man.txt
+++ new/usr/src/man/man1/pack.1.man.txt
1 1 PACK(1) User Commands PACK(1)
2 2
3 3
4 4
5 5 NAME
6 6 pack, pcat, unpack - compress and expand files
7 7
8 8 SYNOPSIS
9 9 pack [-f/] [-] file...
10 10
11 11
12 12 pcat file...
13 13
14 14
15 15 unpack [-/] file...
16 16
17 17
18 18 DESCRIPTION
19 19 pack
20 20 The pack command attempts to store the specified files in a compressed
21 21 form. Wherever possible (and useful), each input file file is replaced
22 22 by a packed file file.z with the same access modes, access and modified
23 23 dates, and owner as those of file. If pack is successful, file is
24 24 removed.
25 25
26 26
27 27 The amount of compression obtained depends on the size of the input
28 28 file and the character frequency distribution. Because a decoding tree
29 29 forms the first part of each .z file, it is usually not worthwhile to
30 30 pack files smaller than three blocks, unless the character frequency
31 31 distribution is very skewed, which can occur with printer plots or
32 32 pictures.
33 33
34 34
35 35 Typically, text files are reduced to 60-75% of their original size.
36 36 Load modules, which use a larger character set and have a more uniform
37 37 distribution of characters, show little compression, the packed
38 38 versions being about 90% of the original size.
39 39
40 40
41 41 The pack utility returns a value that is the number of files that it
42 42 failed to compress. If that number exceeds 255, 255 is returned.
43 43
44 44
45 45 No packing occurs if:
46 46
47 47 o the file appears to be already packed
48 48
49 49 o the file name is too long to add the .z suffix
50 50
51 51 o the file has links
52 52
53 53 o the file is a directory
54 54
55 55 o the file cannot be opened
56 56
57 57 o the file is empty
58 58
↓ open down ↓ |
58 lines elided |
↑ open up ↑ |
59 59 o no disk storage blocks are saved by packing
60 60
61 61 o a file called file.z already exists
62 62
63 63 o the .z file cannot be created
64 64
65 65 o an I/O error occurred during processing.
66 66
67 67
68 68 The last segment of the file name must be short enough to allow space
69 - for the appended .zextension. Directories cannot be compressed.
69 + for the appended .z extension. Directories cannot be compressed.
70 70
71 71 pcat
72 72 The pcat command does for packed files what cat(1) does for ordinary
73 73 files, except that pcat cannot be used as a filter. The specified files
74 74 are unpacked and written to the standard output.
75 75
76 76
77 77 pcat returns the number of files it was unable to unpack. Failure can
78 78 occur if:
79 79
80 80 o the file cannot be opened;
81 81
82 82 o the file does not appear to be the output of pack.
83 83
84 84 unpack
85 85 The unpack command expands files created by pack. For each file
86 86 specified in the command, a search is made for a file called file.z (or
87 87 just file, if file ends in .z). If this file appears to be a packed
88 88 file, it is replaced by its expanded version. The new file has the .z
89 89 suffix stripped from its name, and has the same access modes, access
90 90 and modification dates, and owner as those of the packed file.
91 91
92 92
93 93 unpack returns a value that is the number of files it was unable to
94 94 unpack. Failure can occur for the same reasons that it can in pcat, as
95 95 well as for the following:
96 96
97 97 o a file with the unpacked name already exists;
98 98
99 99 o the unpacked file cannot be created.
100 100
101 101 OPTIONS
102 102 The following options are supported by pack:
103 103
104 104 -f
105 105 Forces packing of file. This is useful for causing an entire
106 106 directory to be packed even if some of the files do not benefit.
107 107 Packed files can be restored to their original form using unpack
108 108 or pcat.
109 109
110 110
111 111
112 112 The following options are supported by pack and unpack:
113 113
114 114 -/
115 115 When packing or unpacking, copies any ACL and extended system
116 116 attributes associated with the source file to the target file. If
117 117 an ACL or extended system attributes cannot be copied, the
118 118 original file is retained, a diagnostic message is written to
119 119 stderr, and the final exit status is non-zero.
120 120
121 121
122 122 OPERANDS
123 123 The following operands are supported:
124 124
125 125 file
126 126 A path name of a file to be packed, unpacked, or pcated; file
127 127 can include or omit the .z suffix.
128 128
129 129
130 130 -
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
131 131 pack uses Huffman (minimum redundancy) codes on a byte-by-byte
132 132 basis. If the - argument is used, an internal flag is set that
133 133 causes the number of times each byte is used, its relative
134 134 frequency, and the code for the byte to be printed on the
135 135 standard output. Additional occurrences of - in place of file
136 136 causes the internal flag to be set and reset.
137 137
138 138
139 139 USAGE
140 140 See largefile(5) for the description of the behavior of pack, pcat, and
141 - unpack when encountering files greater than or equal to 2 Gbyte ( 2^31
141 + unpack when encountering files greater than or equal to 2 Gbyte (2^31
142 142 bytes).
143 143
144 144 EXAMPLES
145 145 Example 1 Viewing a Packed File
146 146
147 147
148 148 To view a packed file named file.z use:
149 149
150 150
151 151
152 152 example% pcat file.z
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
153 153
154 154
155 155
156 156 or just:
157 157
158 158
159 159
160 160 example% pcat file
161 161
162 162
163 - Example 2 Making and Unpacked Copy:
163 + Example 2 Making an Unpacked Copy:
164 164
165 165
166 166 To make an unpacked copy, say nnn, of a packed file named file.z
167 167 (without destroying file.z) use the command:
168 168
169 169
170 170
171 171 example% pcat file >nnn
172 172
173 173
174 174 ENVIRONMENT VARIABLES
175 175 See environ(5) for descriptions of the following environment variables
176 176 that affect the execution of pack, pcat, and unpack: LC_CTYPE,
177 177 LC_MESSAGES, and NLSPATH.
178 178
179 179 EXIT STATUS
180 180 The following exit values are returned:
181 181
182 182 0
183 183 Successful completion.
184 184
185 185
186 186 >0
187 187 An error occurred. The number of files the command failed to
188 188 pack/unpack is returned. If the number of failures exceeds 255,
189 189 then 255 is returned.
190 190
191 191
192 192 ATTRIBUTES
193 193 See attributes(5) for descriptions of the following attributes:
194 194
195 195
196 196
197 197
198 198 +---------------+-----------------+
199 199 |ATTRIBUTE TYPE | ATTRIBUTE VALUE |
↓ open down ↓ |
26 lines elided |
↑ open up ↑ |
200 200 +---------------+-----------------+
201 201 |CSI | Enabled |
202 202 +---------------+-----------------+
203 203
204 204 SEE ALSO
205 205 cat(1), compress(1), zcat(1), fgetattr(3C), fsetattr(3C),
206 206 attributes(5), environ(5), largefile(5)
207 207
208 208
209 209
210 - March 13, 2008 PACK(1)
210 + February 5, 2020 PACK(1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX