Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

Name

ditto

Synopsis

ditto [options] files directory
ditto [options] directory1 directory2
                  

Copies files and directories while preserving most file information, including resource fork and HFS metadata information when desired. ditto preserves the permissions, ownership, and timestamp of the source files in the copies. ditto overwrites identically named files in the target directory without prompting for confirmation.

ditto works like cp in the first synopsis form. However, the second form differs in that cp -r copies the entire directory1 into an existing directory2, while ditto copies the contents of directory1 into directory2, creating directory2 if it doesn’t already exist.

Options

-arch arch

When copying fat binary files, copy only the code for chip type arch. Fat binary files contain different code for different chip architectures. The -arch flag allows you to “thin” the binary by copying only the code for the specified chip. Possible values for arch include ppc, m68k, i386, hppa, and sparc.

-bom pathname

When copying a directory, include in the copy only those items listed in bom file pathname. See also mkbom for information on making a BOM (“bill-of-materials”) file.

-rsrcFork, -rsrc

When copying files, include any resource fork and HFS metadata information.

-v

Be verbose; report each directory copied.

-v

Be very verbose; report each file copied.

Example

Duplicate an entire home directory, copying the contents of directory /Users/chris into the directory Volumes/Drive 2/Users/chris ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata