ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

This manual page is associated with the Mac OS X developer tools. The software or headers described may not be present on your Mac OS X installation until you install the developer tools package. This package is available on your Mac OS X installation DVD, and the latest versions can be downloaded from developer.apple.com.

For more information about the manual page format, see the manual page for manpages(5).



CPMAC(1)                  BSD General Commands Manual                 CPMAC(1)

NAME
     /Developer/Tools/CpMac -- copy files preserving metadata and forks

SYNOPSIS
     /Developer/Tools/CpMac [-rp] [-mac] source target
     /Developer/Tools/CpMac [-rp] [-mac] source ... directory

DESCRIPTION
     In its first form, the /Developer/Tools/CpMac utility copies the contents of the file named by the
     source operand to the destination path named by the target operand.  This form is assumed when the last
     operand does not name an already existing directory.

     In its second form, /Developer/Tools/CpMac copies each file named by a source operand to a destination
     directory named by the directory operand.  The destination path for each operand is the pathname pro-duced produced
     duced by the concatenation of the last operand, a slash, and the final pathname component of the named
     file.

     The following options are available:

     -r    If source designates a directory, /Developer/Tools/CpMac copies the directory and the entire sub-tree subtree
           tree connected at that point.  This option also causes symbolic links to be copied, rather than
           indirected through, and for /Developer/Tools/CpMac to create special files rather than copying
           them as normal files.  Created directories have the same mode as the corresponding source direc-tory, directory,
           tory, unmodified by the process' umask.

     -p    Causes /Developer/Tools/CpMac to preserve in the copy as many of the modification time, access
           time, file flags, file mode, user ID, and group ID as allowed by permissions.

     -mac  Allows use of HFS-style paths for both source and target.  Path elements must be separated by
           colons, and the path must begin with a volume name or a colon (to designate current directory).

NOTES
     The /Developer/Tools/CpMac command does not support the same options as the POSIX cp command, and is
     much less flexible in its operands.  It cannot be used as a direct substitute for cp in scripts.

     As of Mac OS X 10.4, the cp command preserves metadata and resource forks of files on Extended HFS vol-umes, volumes,
     umes, so it can be used in place of CpMac.  The /Developer/Tools/CpMac command will be deprecated in
     future versions of Mac OS X.

SEE ALSO
     cp(1) MvMac(1)

Mac OS X                        April 12, 2004                        Mac OS X

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.