Unix - copy contents of one directory to another [closed]
To make an exact copy, permissions, ownership, and all use "-a" with "cp". "-r" will copy the contents of the files but not necessarily keep other things the same.
cp -av Source/* Dest/
(make sure Dest/ exists first)
If you want to repeatedly update from one to the other or make sure you also copy all dotfiles, rsync
is a great help:
rsync -av --delete Source/ Dest/
This is also "recoverable" in that you can restart it if you abort it while copying. I like "-v" because it lets you watch what is going on but you can omit it.