{\ttfamily kdb cp $<$source$>$ $<$dest$>$}

\subsection*{D\+E\+S\+C\+R\+I\+P\+T\+I\+ON}

This command copies key(s) in the Key database. You can copy keys to another directory within the database or even below another key. Note that you cannot copy a key below itself.

Where {\ttfamily source} is the path of the key(s) you want to copy and {\ttfamily dest} is the path where you would like to copy the key(s) to. Note that when using the {\ttfamily -\/r} flag, {\ttfamily source} as well as all of the keys below it will be copied.

\subsection*{L\+I\+M\+I\+T\+A\+T\+I\+O\+NS}

Neither {\ttfamily source} nor {\ttfamily dest} can be a cascading key. (Start with {\ttfamily /}). Make sure to select a namespace.

\subsection*{R\+E\+T\+U\+RN V\+A\+L\+U\+ES}

This command will return the following values as an exit status\+:


\begin{DoxyItemize}
\item 0\+: No errors.
\item 1-\/10\+: standard exit codes, see \hyperlink{md_doc_help_kdb_doc_help_kdb_md}{kdb(1)}
\item 11\+: No key to copy found.
\end{DoxyItemize}

\subsection*{O\+P\+T\+I\+O\+NS}


\begin{DoxyItemize}
\item {\ttfamily -\/H}, {\ttfamily -\/-\/help}\+: Show the man page.
\item {\ttfamily -\/V}, {\ttfamily -\/-\/version}\+: Print version info.
\item {\ttfamily -\/p}, {\ttfamily -\/-\/profile $<$profile$>$}\+: Use a different kdb profile.
\item {\ttfamily -\/C}, {\ttfamily -\/-\/color $<$when$>$}\+: Print never/auto(default)/always colored output.
\item {\ttfamily -\/r}, {\ttfamily -\/-\/recursive}\+: Recursively copy keys.
\item {\ttfamily -\/v}, {\ttfamily -\/-\/verbose}\+: Explain what is happening.
\item {\ttfamily -\/f}, {\ttfamily -\/-\/force}\+: Force overwriting the keys.
\end{DoxyItemize}

\subsection*{E\+X\+A\+M\+P\+L\+ES}

To copy multiple keys\+:~\newline
 {\ttfamily kdb cp -\/r user/example1 user/example2}

To copy a single key\+:~\newline
 {\ttfamily kdb cp user/example/key1 user/example/key2}

To copy keys below an existing key\+:~\newline
 {\ttfamily kdb cp -\/r user/example user/example/key1}~\newline
 Note that in this example, all keys in the example directory will be copied below {\ttfamily key1} {\bfseries except} {\ttfamily key1}. 