I am trying to copy the contents of a folder to another folder in a different directory using terminal.
Would somebody be able to provide me an example of the command line syntax required to achieve this?
bucks Answered question February 22, 2022
You can copy the content of a folder /source
to another existing folder /dest
with the command
cp -a /source/. /dest/
The -a
option is an improved recursive option, 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.
XX Changed status to publish February 22, 2022