Copy the content of a folder to another preserving permissions and metadata

cp -a /source/. /dest/
The -a option is an improved recursive option (which actually stands for cp --archive), that preserve all file attributes, and also preserve symlinks.

The . at end of the source path is a specific cp syntax that allow to copy all files and folders, included hidden ones.
Advertisements