How can I copy the contents of a folder to another folder in a different directory using terminal?
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?
You are viewing 1 out of 1 answers, click here to view all answers.
You can copy the content of a folder
/source to another existing folder
/dest with the command
cp -a /source/. /dest/
-a option is an improved recursive option, that preserve all file attributes, and also preserve symlinks.
. 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