Copy (cp) shell command examples.

# To copy file1 to file2:
cp file1 file2

# To copy file1 into directory:
cp file1 directory

# To copy files into directory:
cp file1 file2 file3 ... directory

# To copy dir1 into dir2 including subdirectries:
cp -R dir1 dir2/

# To copy directory, preserving permissions:
cp -pR dir1 dir2/

##
# Copy a directory with all files and subdirectories
##
src=/home/$USER         # source
dst=/tmp/backup         # destination
cd "$src"
find . -print | cpio -pdmv "$dst"

# This method can be used to receate a directory hierarchy, without files, too:
find . -type d -print | cpio -pdmv "$dst"

# Copying across a network, this is an indispensable technique:
cd /the/source
tar cf - dir1 dir2 | ssh user@host "cd /the/dest && tar xvf -"