Examples of using the cp command

To copy a single file in the current directory:

   cp notes sect3.txt

This makes a copy of the file notes in the file sect3.txt.


To copy a file using the -i option:

   cp -i notes part2.txt

This makes a copy of the file notes in the file part2.txt. If this file exists, the message

   part2.txt: File exists

is displayed. The file is not copied.


[Home] [Search] [Index] This site maintained by unixhelp@hardrock.org