Appendix 1: Common UNIX Commands
229
cp
This command is used to copy files from one location in the file system to
another. The form of the command is:
cp
Wild cards are permitted in the parameter. If this parameter
refers to more than one file, the must be a directory. There
are a wide range of options for this command. Several are listed here.
a
This option is the same as the dpR and attempts to
retain the permissions and ownerships of the files be
ing copied. This option is the best way to replicate
a file system on another partition, or to move a sub tree
from one place to another without changing its permis
sion structures.
d
Copy symlinks as symlinks rather than the file pointed
to and preserve hard link relationships between files in
the copies.
p
Preserve the owner, group, permissions, and time stamp
found on the original when making the copies.
R
Recursively copy all sub directories and their file con
tents. This will allow a complete limb of a file system to
be replicated somewhere else in the file system.
Example:
cp a /home /mnt
will copy all of the files and directories in /home into the directory /mnt and
will maintain the permissions and ownerships of the files during the copy.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved