macOS

ditto

SafeCopy preserving metadata

ditto <src> <dst>

Copies with resource forks and xattrs intact; -c -k builds Finder-compatible ZIPs.

Examples

  • ditto -c -k --sequesterRsrc app/ app.zipMake a Finder-style ZIP

Syntax

ditto [-c -k] <src> <dst>

Before you run it

Mind overwrites.

Used when you see

USB full of '._' junk files
3
Hand off with attribute-aware copies (ditto)On FAT/exFAT, metadata must become separate files.
See the whole flow →

Related commands

  • cpCopy
  • zipCreate ZIP archives

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store