System Grab Bag

View all TLDR pages from Mac OS X (or from all pages)

ditto

Copy files and directories. More information: https://ss64.com/osx/ditto.html.
  • Overwrite contents of destination directory with contents of source directory:
    ditto {{path/to/source_directory}} {{path/to/destination_directory}}
  • Print a line to the Terminal window for every file that's being copied:
    ditto -V {{path/to/source_directory}} {{path/to/destination_directory}}
  • Copy a given file or directory, while retaining the original file permissions:
    ditto -rsrc {{path/to/source_directory}} {{path/to/destination_directory}}

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.