$darkmode
Elektra 0.11.0
kdb-dirname(1) -- Get the cascading directory name of a key name

kdb dirname <key name>

Where key name is the name of the key.

This command is used to retrieve the directory name of a key, without any namespace.

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

kdb dirname user:/key/subkey
#> /key
kdb dirname /
#> /