CentOS: Copy directory to another directory CentOS: Copy directory to another directory linux linux

CentOS: Copy directory to another directory


cp -r /home/server/folder/test /home/server/


To copy all files, including hidden files use:

cp -r /home/server/folder/test/. /home/server/


As I understand, you want to recursively copy test directory into /home/server/ path...

This can be done as:

-cp -rf /home/server/folder/test/* /home/server/

Hope this helps