Preserve mode, ownership, timestamps, and symlinks.
Section: Copy and Synchronize
Copy a directory tree preserving metadata
bash
bash
cp -a /src/. /dst/Explanation
Preserve mode, ownership, timestamps, and symlinks.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Copy and Synchronize
Mirror a directory with rsync
Powerful local or remote copy preserving metadata and ACLs when supported.
List archive contents
Inspect what an archive contains before extracting.
Create a cpio archive from find
Useful in some initramfs and recovery workflows.
Mirror and delete removed files
Make the destination match the source exactly.