Q. How to copy all files and directory into another location in unix/ linux/ centos
We can copy the contents of a directory /source to another existing directory (folder) /destination with the help of CP command
cp -a /source/. /dest/
# cp -a /SourceTest/ ./DestinationTest/
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.