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
          +++ new/usr/src/man/man1/pack.1
↓ open down ↓ 36 lines elided ↑ open up ↑
  37   37  .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  38   38  .\" If applicable, add the following below this CDDL HEADER, with the
  39   39  .\" fields enclosed by brackets "[]" replaced with your own identifying
  40   40  .\" information: Portions Copyright [yyyy] [name of copyright owner]
  41   41  .\"
  42   42  .\"
  43   43  .\" Copyright 1989 AT&T
  44   44  .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
  45   45  .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
  46   46  .\"
  47      -.TH PACK 1 "Mar 13, 2008"
       47 +.TH PACK 1 "Feb 5, 2020"
  48   48  .SH NAME
  49   49  pack, pcat, unpack \- compress and expand files
  50   50  .SH SYNOPSIS
  51      -.LP
  52   51  .nf
  53   52  \fBpack\fR [\fB-f/\fR] [\fB-\fR] \fIfile\fR...
  54   53  .fi
  55   54  
  56   55  .LP
  57   56  .nf
  58   57  \fBpcat\fR \fIfile\fR...
  59   58  .fi
  60   59  
  61   60  .LP
  62   61  .nf
  63   62  \fBunpack\fR [\fB-/\fR] \fIfile\fR...
  64   63  .fi
  65   64  
  66   65  .SH DESCRIPTION
  67   66  .SS "pack"
  68      -.sp
  69      -.LP
  70   67  The \fBpack\fR command attempts to store the specified files in a compressed
  71   68  form. Wherever possible (and useful), each input file \fBfile\fR is replaced by
  72   69  a packed file \fBfile\fR\fB\&.z\fR with the same access modes, access and
  73   70  modified dates, and owner as those of \fBfile\fR. If \fBpack\fR is successful,
  74   71  \fBfile\fR is removed.
  75   72  .sp
  76   73  .LP
  77   74  The amount of compression obtained depends on the size of the input file and
  78   75  the character frequency distribution. Because a decoding tree forms the first
  79   76  part of each \fB\&.z\fR file, it is usually not worthwhile to pack files
↓ open down ↓ 68 lines elided ↑ open up ↑
 148  145  .RE
 149  146  .RS +4
 150  147  .TP
 151  148  .ie t \(bu
 152  149  .el o
 153  150  an I/O error occurred during processing.
 154  151  .RE
 155  152  .sp
 156  153  .LP
 157  154  The last segment of the file name must be short enough to allow space for the
 158      -appended \fB\&.z\fRextension. Directories cannot be compressed.
      155 +appended \fB\&.z\fR extension. Directories cannot be compressed.
 159  156  .SS "pcat"
 160      -.sp
 161      -.LP
 162  157  The \fBpcat\fR command does for packed files what \fBcat\fR(1) does for
 163  158  ordinary files, except that \fBpcat\fR cannot be used as a filter. The
 164  159  specified files are unpacked and written to the standard output.
 165  160  .sp
 166  161  .LP
 167  162  \fBpcat\fR returns the number of files it was unable to unpack. Failure can
 168  163  occur if:
 169  164  .RS +4
 170  165  .TP
 171  166  .ie t \(bu
 172  167  .el o
 173  168  the file cannot be opened;
 174  169  .RE
 175  170  .RS +4
 176  171  .TP
 177  172  .ie t \(bu
 178  173  .el o
 179  174  the file does not appear to be the output of \fBpack\fR.
 180  175  .RE
 181  176  .SS "unpack"
 182      -.sp
 183      -.LP
 184  177  The \fBunpack\fR command expands files created by \fBpack\fR. For each
 185  178  \fBfile\fR specified in the command, a search is made for a file called
 186  179  \fBfile\fR\fB\&.z\fR (or just \fBfile\fR, if \fBfile\fR ends in \fB\&.z\fR). If
 187  180  this file appears to be a packed file, it is replaced by its expanded version.
 188  181  The new file has the \fB\&.z\fR suffix stripped from its name, and has the same
 189  182  access modes, access and modification dates, and owner as those of the packed
 190  183  file.
 191  184  .sp
 192  185  .LP
 193  186  \fBunpack\fR returns a value that is the number of files it was unable to
↓ open down ↓ 5 lines elided ↑ open up ↑
 199  192  .el o
 200  193  a file with the unpacked name already exists;
 201  194  .RE
 202  195  .RS +4
 203  196  .TP
 204  197  .ie t \(bu
 205  198  .el o
 206  199  the unpacked file cannot be created.
 207  200  .RE
 208  201  .SH OPTIONS
 209      -.sp
 210      -.LP
 211  202  The following options are supported by \fBpack\fR:
 212  203  .sp
 213  204  .ne 2
 214  205  .na
 215  206  \fB\fB-f\fR\fR
 216  207  .ad
 217  208  .RS 6n
 218  209  Forces packing of \fBfile\fR. This is useful for causing an entire directory to
 219  210  be packed even if some of the files do not benefit. Packed files can be
 220  211  restored to their original form using \fBunpack\fR or \fBpcat\fR.
↓ open down ↓ 9 lines elided ↑ open up ↑
 230  221  .ad
 231  222  .RS 6n
 232  223  When packing or unpacking, copies any ACL and extended system attributes
 233  224  associated with the source file to the target file. If an ACL or extended
 234  225  system attributes cannot be copied, the original file is retained, a diagnostic
 235  226  message is written to \fBstderr\fR, and the final exit status is
 236  227  \fBnon-zero\fR.
 237  228  .RE
 238  229  
 239  230  .SH OPERANDS
 240      -.sp
 241      -.LP
 242  231  The following operands are supported:
 243  232  .sp
 244  233  .ne 2
 245  234  .na
 246  235  \fB\fBfile\fR\fR
 247  236  .ad
 248  237  .RS 8n
 249  238  A path name of a file to be packed, unpacked, or pcated; \fBfile\fR can include
 250  239  or omit the \fB\&.z\fR suffix.
 251  240  .RE
↓ open down ↓ 5 lines elided ↑ open up ↑
 257  246  .ad
 258  247  .RS 8n
 259  248  \fBpack\fR uses Huffman (minimum redundancy) codes on a byte-by-byte basis. If
 260  249  the \fB\(mi\fR argument is used, an internal flag is set that causes the number
 261  250  of times each byte is used, its relative frequency, and the code for the byte
 262  251  to be printed on the standard output. Additional occurrences of \fB\(mi\fR in
 263  252  place of \fBfile\fR causes the internal flag to be set and reset.
 264  253  .RE
 265  254  
 266  255  .SH USAGE
 267      -.sp
 268      -.LP
 269  256  See \fBlargefile\fR(5) for the description of the behavior of \fBpack\fR,
 270  257  \fBpcat\fR, and \fBunpack\fR when encountering files greater than or equal to 2
 271      -Gbyte ( 2^31 bytes).
      258 +Gbyte (2^31 bytes).
 272  259  .SH EXAMPLES
 273      -.LP
 274  260  \fBExample 1 \fRViewing a Packed File
 275  261  .sp
 276  262  .LP
 277  263  To view a packed file named \fBfile.z\fR use:
 278  264  
 279  265  .sp
 280  266  .LP
 281  267  \fBexample%\fR \fBpcat\fR \fBfile.z\fR
 282  268  
 283  269  .sp
 284  270  .LP
 285  271  or just:
 286  272  
 287  273  .sp
 288  274  .LP
 289  275  \fBexample%\fR \fBpcat\fR \fBfile\fR
 290  276  
 291  277  .LP
 292      -\fBExample 2 \fRMaking and Unpacked Copy:
      278 +\fBExample 2 \fRMaking an Unpacked Copy:
 293  279  .sp
 294  280  .LP
 295  281  To make an unpacked copy, say \fBnnn\fR, of a packed file named \fBfile.z\fR
 296  282  (without destroying \fBfile.z\fR) use the command:
 297  283  
 298  284  .sp
 299  285  .LP
 300  286  \fBexample%\fR \fBpcat\fR \fBfile\fR \fB>nnn\fR
 301  287  
 302  288  .SH ENVIRONMENT VARIABLES
 303      -.sp
 304      -.LP
 305  289  See \fBenviron\fR(5) for descriptions of the following environment variables
 306  290  that affect the execution of \fBpack\fR, \fBpcat\fR, and \fBunpack\fR:
 307  291  \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 308  292  .SH EXIT STATUS
 309      -.sp
 310      -.LP
 311  293  The following exit values are returned:
 312  294  .sp
 313  295  .ne 2
 314  296  .na
 315  297  \fB\fB0\fR\fR
 316  298  .ad
 317  299  .RS 6n
 318  300  Successful completion.
 319  301  .RE
 320  302  
↓ open down ↓ 2 lines elided ↑ open up ↑
 323  305  .na
 324  306  \fB\fB>0\fR\fR
 325  307  .ad
 326  308  .RS 6n
 327  309  An error occurred. The number of files the command failed to pack/unpack is
 328  310  returned. If the number of failures exceeds \fB255\fR, then \fB255\fR is
 329  311  returned.
 330  312  .RE
 331  313  
 332  314  .SH ATTRIBUTES
 333      -.sp
 334      -.LP
 335  315  See \fBattributes\fR(5) for descriptions of the following attributes:
 336  316  .sp
 337  317  
 338  318  .sp
 339  319  .TS
 340  320  box;
 341  321  c | c
 342  322  l | l .
 343  323  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 344  324  _
 345  325  CSI     Enabled
 346  326  .TE
 347  327  
 348  328  .SH SEE ALSO
 349      -.sp
 350      -.LP
 351  329  \fBcat\fR(1), \fBcompress\fR(1), \fBzcat\fR(1), \fBfgetattr\fR(3C),
 352  330  \fBfsetattr\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5), \fBlargefile\fR(5)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX