tldr/pages/osx/ditto.md

16 lines
433 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# ditto
> Copy files and folders.
- Overwrites contents of destination folder with contents of source folder:
`ditto {{path/to/source}} {{path/to/destination}}`
- Print a line to the Terminal window for every file thats being copied:
`ditto -V {{path/to/source}} {{path/to/destination}}`
- Copy a given file or folder, while retaining the original file permissions:
`ditto -rsrc {{path/to/source}} {{path/to/destination}}`