OpenWindows Advanced User's Guide

3.3.8 Copying Directories

Use the cp -r command to copy directories and the files they contain:

$ cp -r veggies veggies3

This command copies all files and subdirectories within the directory veggies to a new directory veggies3. This is a recursive copy, as designated by the -r option. If you attempt to copy a directory without using this option, you will see an error message.