{\ttfamily kdb setmeta $<$key name$>$ $<$metaname$>$ \mbox{[}$<$metavalue$>$\mbox{]}}

Where {\ttfamily key name} is the name of the key that the metakey is associated with, {\ttfamily metaname} is the name of the metakey the user would like to set the value of (or create), and {\ttfamily metavalue} is the value the user wishes to set the metakey to. If no {\ttfamily metavalue} is given, the metakey will be removed.

This command allows the user to set the value of an individual metakey. If a key does not already exist and the user tries setting a metakey associated with it, the key will be created with a null value. There is some special handling for the metadata atime, mtime and ctime. They will be converted to time\+\_\+t.

For cascading keys, the namespace will default to {\ttfamily spec}, because that is the place where you usually want to set metadata.


\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 -\/v}, {\ttfamily -\/-\/verbose}\+: Explain what is happening. Prints additional information in case of errors/warnings.
\item {\ttfamily -\/d}, {\ttfamily -\/-\/debug}\+: Give debug information. Prints additional debug information in case of errors/warnings.
\item {\ttfamily -\/q}, {\ttfamily -\/-\/quiet}\+: Suppress non-\/error messages.
\end{DoxyItemize}


\begin{DoxyItemize}
\item {\ttfamily /sw/elektra/kdb/\#0/current/verbose}\+: Same as {\ttfamily -\/v}\+: Explain what is happening.
\item {\ttfamily /sw/elektra/kdb/\#0/current/quiet}\+: Same as {\ttfamily -\/q}\+: Suppress default messages.
\item {\ttfamily /sw/elektra/kdb/\#0/current/namespace}\+: Specifies which default namespace should be used when setting a cascading name. By default the namespace is {\ttfamily user}, except {\ttfamily kdb} is used as root, then {\ttfamily system} is the default.
\end{DoxyItemize}

To set a metakey called {\ttfamily description} associated with the key {\ttfamily user/example/key} to the value {\ttfamily Hello World!}\+:~\newline
 {\ttfamily kdb setmeta spec/example/key description \char`\"{}\+Hello World!\char`\"{}}

To create a new key {\ttfamily spec/example/newkey} with a null value (if it did not exist before) and a metakey {\ttfamily namespace/\#0} associated with it to the value {\ttfamily system}\+:~\newline
 {\ttfamily kdb setmeta /example/newkey \char`\"{}namespace/\#0\char`\"{} system}

To create an override link for a {\ttfamily /test} key\+:


\begin{DoxyCode}
kdb set /overrides/test "example override"
sudo kdb setmeta spec/test override/#0 /overrides/test
\end{DoxyCode}


To remove it\+:


\begin{DoxyCode}
sudo kdb setmeta spec/test override/#0
\end{DoxyCode}



\begin{DoxyItemize}
\item How to get metadata\+: \hyperlink{doc_help_kdb-getmeta_md}{kdb-\/getmeta(1)}
\item \hyperlink{doc_help_elektra-metadata_md}{elektra-\/metadata(7)} for an explanation of the metadata concepts.
\item \hyperlink{doc_help_elektra-key-names_md}{elektra-\/key-\/names(7)} for an explanation of key names. 
\end{DoxyItemize}