| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cp - Copy Files or Directories The cp command works similar to the copy command in DOS. The general form of this command is: cp [options] source_location destination_location This will copy the file source_location to destination_location. Source_location and destination_location can be either an absolute (complete) address or a relative (partial) address. When copying, if destination_location is a directory, a new file will be created within destination_location, with the file name, source_location. If destination_location is a file name, the contents of source_location will be copied to destination_location. An important item to remember once again: UNIX philosophy assumes that one knows what they are doing. The cp command is not interactive by default. For example: if the destination file exists and has content; before the command is executed, it will not prompt to or ask if this action should be completed and warn that the file is about to be overwritten. It will simply overwrite destination_location. The interactive option (the -i option) will check to see if destination_location exists and if so, it will ask if destination_location is to be over written, with choice of y or n to allow or not allow the command to complete. If source_location is a directory name then destination_location must also be a directory name. Additionally if source_location is a directory and contains directories, which contain files, and those are to be copied the -r option (recursive) must be used and will copy a directory, its contents, its sub directories, and all of their contents and sub directories and so forth to the destination_location directory.
Home - Table Of Contents - Contact Us CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com Version 1.0 - Version Date: March 29, 2005 Adapted with permission from a work created by Tcat Houser et al. CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||