forked from ElektraInitiative/libelektra
/
kdb-ls.1
128 lines (117 loc) · 3.81 KB
/
kdb-ls.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "KDB\-LS" "1" "June 2019" "" ""
.
.SH "NAME"
\fBkdb\-ls\fR \- List keys in the key database
.
.SH "SYNOPSIS"
\fBkdb ls <path>\fR
.
.P
Where \fBpath\fR is the path in which the user would like to list keys below\.
.
.SH "DESCRIPTION"
This command will list the name of all keys below a given path\.
.
.SH "OPTIONS"
.
.TP
\fB\-H\fR, \fB\-\-help\fR
Show the man page\.
.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print version info\.
.
.TP
\fB\-p\fR, \fB\-\-profile <profile>\fR
Use a different kdb profile\.
.
.TP
\fB\-C\fR, \fB\-\-color <when>\fR
Print never/auto(default)/always colored output\.
.
.TP
\fB\-m\fR, \fB\-\-min\-depth <min\-depth>\fR
Specify the minimum path depth of the output (0 by default), exclusive and relative to the name to list\.
.
.TP
\fB\-M\fR, \fB\-\-max\-depth <max\-depth>\fR
Specify the maximum path depth of the output (unlimited by default, 1 to show only the next level), inclusive and relative to the name to list\.
.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Explain what is happening\. Prints additional information in case of errors/warnings\.
.
.TP
\fB\-d\fR, \fB\-\-debug\fR
Give debug information\. Prints additional debug information in case of errors/warnings\.
.
.TP
\fB\-0\fR, \fB\-\-null\fR
Use binary 0 termination\.
.
.SH "EXAMPLES"
.
.nf
# Backup\-and\-Restore: user/tests/examples
# We use `dump` as storage format here, since storage plugins such as INI
# automatically add keys between levels (e\.g\. `user/tests/examples/kdb\-ls/test/foo`)\.
sudo kdb mount ls\.ecf user/tests/examples dump
# Create the keys we use for the examples
kdb set user/tests/examples/kdb\-ls/test val1
kdb set user/tests/examples/kdb\-ls/test/foo/bar val2
kdb set user/tests/examples/kdb\-ls/test/fizz/buzz fizzbuzz
kdb set user/tests/examples/kdb\-ls/tost val3
kdb set user/tests/examples/kdb\-ls/tost/level lvl
# list all keys below /tests/examples/kdb\-ls
kdb ls /tests/examples/kdb\-ls
#> user/tests/examples/kdb\-ls/test
#> user/tests/examples/kdb\-ls/test/fizz/buzz
#> user/tests/examples/kdb\-ls/test/foo/bar
#> user/tests/examples/kdb\-ls/tost
#> user/tests/examples/kdb\-ls/tost/level
# list the next level of keys below /tests/examples/kdb\-ls
# note that if the search key ends with a /, it lists the next level
kdb ls /tests/examples/kdb\-ls/ \-\-max\-depth=1
#> user/tests/examples/kdb\-ls/test
#> user/tests/examples/kdb\-ls/tost
# list the current level of keys below /tests/examples/kdb\-ls
# note the difference to the previous example
kdb ls /tests/examples/kdb\-ls \-\-max\-depth=1
# this yields no output as /tests/examples/kdb\-ls is not a key
# list all keys below /tests/examples/kdb\-ls with are minimum 1 level (inclusive) away from that key
# and maximum 2 levels away (exclusive)
kdb ls /tests/examples/kdb\-ls \-\-min\-depth=1 \-\-max\-depth=2
#> user/tests/examples/kdb\-ls/test
#> user/tests/examples/kdb\-ls/tost
# list all keys below /tests/examples/kdb\-ls/test
kdb ls /tests/examples/kdb\-ls/test
#> user/tests/examples/kdb\-ls/test
#> user/tests/examples/kdb\-ls/test/fizz/buzz
#> user/tests/examples/kdb\-ls/test/foo/bar
# list all keys under /tests/examples/kdb\-ls in verbose mode
kdb ls /tests/examples/kdb\-ls/ \-v
#> size of all keys in mount point: 5
#> size of requested keys: 5
#> user/tests/examples/kdb\-ls/test
#> user/tests/examples/kdb\-ls/test/fizz/buzz
#> user/tests/examples/kdb\-ls/test/foo/bar
#> user/tests/examples/kdb\-ls/tost
#> user/tests/examples/kdb\-ls/tost/level
kdb rm \-r user/tests/examples
sudo kdb umount user/tests/examples
.
.fi
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
If the user would also like to see the values of the keys below \fBpath\fR then you should consider the kdb\-export(1) \fIkdb\-export\.md\fR command\.
.
.IP "\(bu" 4
elektra\-key\-names(7) \fIelektra\-key\-names\.md\fR for an explanation of key names\.
.
.IP "" 0