next up previous contents index
Next: df Up: Appendix 1: Common UNIX Previous: chown   Contents   Index

cp

This command is used to copy files from one location in the file system to another. The form of the command is:

cp <options> <from files> <to location>

Wild cards are permitted in the <from files> parameter. If this parameter refers to more than one file, the <to location> must be a directory. There are a wide range of options for this command. Several are listed here.


\begin{hanging}
\item{-a} This option is the same as the \textbf{-dpR} and attem...
...a file system to be replicated somewhere else in
the file system.
\end{hanging}

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.



Dale Scheetz