The cp command is used to copy a file or set of files to a target directory, optionally providing it with a new name:
$ ls oldfile $ cp oldfile newfile $ ls oldfile newfile
The new file in this case is truly a copy; you can change data in either the old or new file, and it won't affect data in the other.
If you specify more than two arguments after the options, with the last one being a directory, cp will copy all of the files before the last one into the directory name in the last argument:
$ cp file1 file2 file3 dir
cp with no options cannot copy directories or whole directory trees, and may give you an error message if it fails. The following output is from the GNU version of cp, referring to the non-standard -r option:
$ ls olddir $ cp olddir newdir cp: -r not specified; omitting directory 'olddir'
If you provide the standardized -R option, you can copy a directory and all of the files beneath it:
$ cp -R olddir newdir
The GNU cp, which you are probably using if you're running GNU/Linux, includes a -v switch that shows each name as it's printed. This is particularly useful along with -R. Other versions of cp, such as those installed by default on BSD systems, may lack this option.
$ cp -Rv olddir newdir 'olddir' -> 'newdir' 'olddir/file1' -> 'newdir/file1' 'olddir/file2' -> 'newdir/file2' 'olddir/file3' -> 'newdir/file3'