cp file1 file2 creates a copy of file1 called file2
Example 1: cp letter form creates a copy of letter, called form.
cp file1 dir creates a copy of file1 in the directory dir, keeping the same name.
Example 2: cp letter Archive creates a copy of letter in the directory Archive with the name letter.
Example 3: cp letter .. creates a copy of letter in the parent directory.
Example 4: cp ~marian/Bank.java . creates a copy of ~marian/Bank.java in your current directory
Example 5: cp -r ~marian/Wu/ch1 . copies the directory ~marian/Wu/ch1, all of its subdirectories and their contents to the current directory.
cp dir/file1 dir/file2 creates a copy of file1 in the directory dir, with the new name file2.
Example 5: cp letter Archive/form creates a copy of letter in the directory Archive with the name form.
Example 6: cp ~marian/Bank.java ./Cash.java creates a copy of ~marian/Bank.java in your current directory with the new name Cash.java
Example 7: cp ~marian/51/LLcode/chap02/* . creates a copy of all files in ~marian/51/LLcode/chap02 in your current directory with the new name Cash.java