6

The man page for cp says this about the -a option:

Same as -pPR options. Preserves structure and attributes of files but not directory structure.

FreeBSD cp's manual does not have this caveat, although the structure of the options remains very similar, if not identical.

What does not preserving directory structure mean in this case?

2

It means that if you copy into an existing directory it will not delete existing files and subdirectories (and existing subdirectories will have their existing permissions and ownership information, even if there is a directory of the same name in the source copy). This is equivalent to the "merge" option when copying a folder in the Finder, and there is no equivalent to the replace option.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .