Sometimes we need to copy an entire folder, including all its content from one location to another. For that purposes we can use cp command. But most of users (including me) experience problems with it. If you try to copy files using star wildcard "*", it wont copy hidden files and folders.
For example:
mkdir /tmp/dir1
cp -r /home/username/* /tmp/dir1
This method does not copy hidden files and folders, such as '/home/username/.bashrc'.