Examples of copying directories with the cp command

Examples of copying directories with the cp command

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.


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.


[Home] [Search] [Index] This site maintained by unixhelp@math.rutgers.edu
This page was last updated on September 05, 2006 at 10:30 am and is maintained by webmaster@math.rutgers.edu.
For questions regarding courses and/or special permission, please contact mclausen@math.rutgers.edu.
For questions or comments about this site, please contact help@math.rutgers.edu.
© 2012 Rutgers, The State University of New Jersey. All rights reserved.