options random home http://www.fmi.uni-passau.de/archive/doc/unix/unixhelp/Unixhelp/tasks_cp1.html (Einblicke ins Internet, ~06/1995)

Examples of copying directories with the cp command

Examples of copying directories with the cp command

1. To create a new copy of a directory:

   cp -r draft presentation

This copies all the files and subdirectories in the directory draft into a new directory presentation.

2. You try to create a copy of a directory using the name of directory that already exists:

   cp -r planA projects

If the directory projects already exists, then a copy of the directory planA will be created in this directory.