Elektra  0.8.26
kdb-setmeta(1) -- Set the value of a metakey

SYNOPSIS

kdb setmeta <key name> <metaname> [<metavalue>]

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

DESCRIPTION

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 spec, because that is the place where you usually want to set metadata.

OPTIONS

KDB

EXAMPLES

To set a metakey called description associated with the key user/example/key to the value Hello World!:
kdb setmeta spec/example/key description "Hello World!"

To create a new key spec/example/newkey with a null value (if it did not exist before) and a metakey namespace/#0 associated with it to the value system:
kdb setmeta /example/newkey "namespace/#0" system

To create an override link for a /test key:

kdb set /overrides/test "example override"
sudo kdb setmeta spec/test override/#0 /overrides/test

To remove it:

sudo kdb setmeta spec/test override/#0

SEE ALSO