hide random home http://www.fmi.uni-passau.de/archive/doc/unix/unixhelp/Unixhelp/examples_cp1.html (Einblicke ins Internet, 10/1995)

Examples of using the cp command

Examples of using the cp command

1. 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.

2. 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 prompt

   part2.txt: File exists

is displayed. The file is not copied.