This works for me.
cp -r /home/server/folder/test/. /home/server
To copy all files, including hidden files use:
cp -r /home/server/folder/test/. /home/server/
For copy directory use following command
cp -r source Destination
For example
cp -r /home/hasan /opt
For copy file use command without -r
cp /home/file /home/hasan/
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
Source: Stackoverflow.com