Print this page
12745 man page typos

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/cp.1
          +++ new/usr/src/man/man1/cp.1
↓ open down ↓ 37 lines elided ↑ open up ↑
  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  .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
  45   45  .\" Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
  46   46  .\" Copyright 2013 Nexenta Systems, Inc. All rights reserved.
  47   47  .\"
  48      -.TH CP 1 "Apr 15, 2013"
       48 +.TH CP 1 "May 17, 2020"
  49   49  .SH NAME
  50   50  cp \- copy files
  51   51  .SH SYNOPSIS
  52      -.LP
  53   52  .nf
  54   53  \fB/usr/bin/cp\fR [\fB-afip@/\fR] \fIsource_file\fR \fItarget_file\fR
  55   54  .fi
  56   55  
  57   56  .LP
  58   57  .nf
  59   58  \fB/usr/bin/cp\fR [\fB-afip@/\fR] \fIsource_file\fR... \fItarget\fR
  60   59  .fi
  61   60  
  62   61  .LP
↓ open down ↓ 20 lines elided ↑ open up ↑
  83   82  .nf
  84   83  \fB/usr/xpg4/bin/cp\fR [\fB-r\fR | \fB-R\fR [\fB-H\fR | \fB-L\fR | \fB-P\fR]] [\fB-afip@/\fR] \fIsource_dir\fR... \fItarget\fR
  85   84  .fi
  86   85  
  87   86  .LP
  88   87  .nf
  89   88  \fB/usr/xpg4/bin/cp\fR [\fB-R\fR | \fB-R\fR [\fB-H\fR | \fB-L\fR | \fB-P\fR]] [\fB-afip@/\fR] \fIsource_dir\fR... \fItarget\fR
  90   89  .fi
  91   90  
  92   91  .SH DESCRIPTION
  93      -.sp
  94      -.LP
  95   92  In the first synopsis form, neither \fIsource_file\fR nor \fItarget_file\fR are
  96   93  directory files, nor can they have the same name. The \fBcp\fR utility copies
  97   94  the contents of \fIsource_file\fR to the destination path named by
  98   95  \fItarget_file\fR. If \fItarget_file\fR exists, \fBcp\fR overwrites its
  99   96  contents, but the mode (and \fBACL\fR if applicable), owner, and group
 100   97  associated with it are not changed. The last modification time of
 101   98  \fItarget_file\fR and the last access time of \fIsource_file\fR are set to the
 102   99  time the copy was made. If \fItarget_file\fR does not exist, \fBcp\fR creates a
 103  100  new file named \fItarget_file\fR that has the same mode as \fIsource_file\fR
 104  101  except that the sticky bit is not set unless the user is super-user. In this
↓ open down ↓ 9 lines elided ↑ open up ↑
 114  111  directory specified by \fItarget\fR. It is an error if any \fIsource_file\fR is
 115  112  a file of type directory, if \fItarget\fR either does not exist or is not a
 116  113  directory.
 117  114  .sp
 118  115  .LP
 119  116  In the third or fourth synopsis forms, one or more directories specified by
 120  117  \fIsource_dir\fR are copied to the directory specified by \fItarget\fR. Either
 121  118  the \fB-r\fR or \fB-R\fR must be specified. For each \fIsource_dir\fR, \fBcp\fR
 122  119  copies all files and subdirectories.
 123  120  .SH OPTIONS
 124      -.sp
 125      -.LP
 126  121  The following options are supported for both \fB/usr/bin/cp\fR and
 127  122  \fB/usr/xpg4/bin/cp\fR:
 128  123  .sp
 129  124  .ne 2
 130  125  .na
 131  126  \fB\fB-a\fR\fR
 132  127  .ad
 133  128  .RS 6n
 134  129  Archive mode. Same as -RpP.
 135  130  .RE
↓ open down ↓ 129 lines elided ↑ open up ↑
 265  260  then a diagnostic message is written to \fBstderr\fR and (after processing any
 266  261  remaining operands) exits with a \fBnon-zero\fR exit status.
 267  262  .RE
 268  263  
 269  264  .sp
 270  265  .LP
 271  266  Specifying more than one of the mutually-exclusive options \fB-H\fR, \fB-L\fR,
 272  267  and \fB-P\fR is not considered an error. The last option specified determines
 273  268  the behavior of the utility.
 274  269  .SS "/usr/bin/cp"
 275      -.sp
 276      -.LP
 277  270  If the \fB-p\fR option is specified with either the \fB-@\fR option or the
 278  271  \fB-/\fR option, \fB/usr/bin/cp\fR behaves as follows
 279  272  .RS +4
 280  273  .TP
 281  274  .ie t \(bu
 282  275  .el o
 283  276  When both \fB-p\fR and \fB-@\fR are specified in any order, the copy fails if
 284  277  extended attributes cannot be copied.
 285  278  .RE
 286  279  .RS +4
 287  280  .TP
 288  281  .ie t \(bu
 289  282  .el o
 290  283  When both \fB-p\fR and \fB-/\fR are specified in any order, the copy fails if
 291  284  extended system attributes cannot be copied.
 292  285  .RE
 293  286  .SS "/usr/xpg4/bin/cp"
 294      -.sp
 295      -.LP
 296  287  If the \fB-p\fR option is specified with either the \fB-@\fR option or the
 297      -\fB-/\fR option, /\fBusr/xpg4/bin/cp\fR behaves as follows:
      288 +\fB-/\fR option, \fB/usr/xpg4/bin/cp\fR behaves as follows:
 298  289  .RS +4
 299  290  .TP
 300  291  .ie t \(bu
 301  292  .el o
 302  293  When both \fB-p\fR and \fB-@\fR are specified, the last option specified
 303  294  determines whether the copy fails if extended attributes cannot be preserved.
 304  295  .RE
 305  296  .RS +4
 306  297  .TP
 307  298  .ie t \(bu
 308  299  .el o
 309  300  When both \fB-p\fR and \fB-/\fR are specified, the last option specified
 310  301  determines whether the copy fails if extended system attributes cannot be
 311  302  preserved.
 312  303  .RE
 313  304  .SH OPERANDS
 314      -.sp
 315      -.LP
 316  305  The following operands are supported:
 317  306  .sp
 318  307  .ne 2
 319  308  .na
 320  309  \fB\fIsource_file\fR\fR
 321  310  .ad
 322  311  .RS 15n
 323  312  A pathname of a regular file to be copied.
 324  313  .RE
 325  314  
↓ open down ↓ 19 lines elided ↑ open up ↑
 345  334  .sp
 346  335  .ne 2
 347  336  .na
 348  337  \fB\fItarget\fR\fR
 349  338  .ad
 350  339  .RS 15n
 351  340  A pathname of a directory to contain the copied files.
 352  341  .RE
 353  342  
 354  343  .SH USAGE
 355      -.sp
 356      -.LP
 357  344  See \fBlargefile\fR(5) for the description of the behavior of \fBcp\fR when
 358  345  encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
 359  346  .SH EXAMPLES
 360      -.LP
 361  347  \fBExample 1 \fRCopying a File
 362  348  .sp
 363  349  .LP
 364  350  The following example copies a file:
 365  351  
 366  352  .sp
 367  353  .in +2
 368  354  .nf
 369  355  example% cp goodies goodies.old
 370  356  
↓ open down ↓ 84 lines elided ↑ open up ↑
 455  441  
 456  442  
 457  443  $ ls -/c /tmp/file1
 458  444  -rw-r--r--   1 foo    staff          0 Oct 29 20:09 /tmp/file1
 459  445                  {}
 460  446  .fi
 461  447  .in -2
 462  448  .sp
 463  449  
 464  450  .SH ENVIRONMENT VARIABLES
 465      -.sp
 466      -.LP
 467  451  See \fBenviron\fR(5) for descriptions of the following environment variables
 468  452  that affect the execution of \fBcp\fR: \fBLANG\fR, \fBLC_ALL\fR,
 469  453  \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
 470  454  .sp
 471  455  .LP
 472  456  Affirmative responses are processed using the extended regular expression
 473  457  defined for the \fByesexpr\fR keyword in the \fBLC_MESSAGES\fR category of the
 474  458  user's locale. The locale specified in the \fBLC_COLLATE\fR category defines
 475  459  the behavior of ranges, equivalence classes, and multi-character collating
 476  460  elements used in the expression defined for \fByesexpr\fR. The locale specified
 477  461  in \fBLC_CTYPE\fR determines the locale for interpretation of sequences of
 478  462  bytes of text data a characters, the behavior of character classes used in the
 479  463  expression defined for the \fByesexpr\fR. See \fBlocale\fR(5).
 480  464  .SH EXIT STATUS
 481      -.sp
 482      -.LP
 483  465  The following exit values are returned:
 484  466  .sp
 485  467  .ne 2
 486  468  .na
 487  469  \fB\fB0\fR\fR
 488  470  .ad
 489  471  .RS 6n
 490  472  All files were copied successfully.
 491  473  .RE
 492  474  
 493  475  .sp
 494  476  .ne 2
 495  477  .na
 496  478  \fB\fB>0\fR\fR
 497  479  .ad
 498  480  .RS 6n
 499  481  An error occurred.
 500  482  .RE
 501  483  
 502  484  .SH ATTRIBUTES
 503      -.sp
 504      -.LP
 505  485  See \fBattributes\fR(5) for descriptions of the following attributes:
 506  486  .SS "/usr/bin/cp"
 507      -.sp
 508      -
 509      -.sp
 510  487  .TS
 511  488  box;
 512  489  c | c
 513  490  l | l .
 514  491  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 515  492  _
 516  493  CSI     Enabled
 517  494  _
 518  495  Interface Stability     Committed
 519  496  .TE
 520  497  
 521  498  .SS "/usr/xpg4/bin/cp"
 522      -.sp
 523      -
 524      -.sp
 525  499  .TS
 526  500  box;
 527  501  c | c
 528  502  l | l .
 529  503  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 530  504  _
 531  505  CSI     Enabled
 532  506  _
 533  507  Interface Stability     Committed
 534  508  .TE
 535  509  
 536  510  .SH SEE ALSO
 537      -.sp
 538      -.LP
 539  511  \fBchmod\fR(1), \fBchown\fR(1), \fBsetfacl\fR(1), \fButime\fR(2),
 540  512  \fBfgetattr\fR(3C), \fBattributes\fR(5), \fBenviron\fR(5), \fBfsattr\fR(5),
 541  513  \fBlargefile\fR(5), \fBlocale\fR(5), \fBstandards\fR(5)
 542  514  .SH NOTES
 543      -.sp
 544      -.LP
 545  515  The permission modes of the source file are preserved in the copy.
 546  516  .sp
 547  517  .LP
 548  518  A \fB--\fR permits the user to mark the end of any command line options
 549  519  explicitly, thus allowing \fBcp\fR to recognize filename arguments that begin
 550  520  with a \fB-\fR.
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX