In Ubuntu, how to copy all contents of a folder to another folder?

I want to copy the contents of an unzipped folder, wordpress/, to another existing folder.

I tried

cp -R wordpress/*.* /my/folder

but the sub-folders in wordpress/ didn't get copied over.

Why not?


Solution 1:

try

cp -r wordpress/* /my/folder

Solution 2:

If you have hidden files/directories then you'll need to run the following from inside the source directory

tar pcf - .| (cd /path/to/destination; tar pxf -)

that will copy all files and folders including ones starting with a . (dot).

If you don't have hidden files/directories that need to be copied then wliao's answer will do.

(edited for clarity)