Imported Upstream version 1.10.1
[platform/upstream/augeas.git] / man / augtool.1
1 .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.31)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is turned on, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{
60 .    if \nF \{
61 .        de IX
62 .        tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 .        if !\nF==2 \{
65 .            nr % 0
66 .            nr F 2
67 .        \}
68 .    \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
74 .    \" fudge factors for nroff and troff
75 .if n \{\
76 .    ds #H 0
77 .    ds #V .8m
78 .    ds #F .3m
79 .    ds #[ \f1
80 .    ds #] \fP
81 .\}
82 .if t \{\
83 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 .    ds #V .6m
85 .    ds #F 0
86 .    ds #[ \&
87 .    ds #] \&
88 .\}
89 .    \" simple accents for nroff and troff
90 .if n \{\
91 .    ds ' \&
92 .    ds ` \&
93 .    ds ^ \&
94 .    ds , \&
95 .    ds ~ ~
96 .    ds /
97 .\}
98 .if t \{\
99 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 .    \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 .    \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 .    \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 .    ds : e
123 .    ds 8 ss
124 .    ds o a
125 .    ds d- d\h'-1'\(ga
126 .    ds D- D\h'-1'\(hy
127 .    ds th \o'bp'
128 .    ds Th \o'LP'
129 .    ds ae ae
130 .    ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "AUGTOOL 1"
136 .TH AUGTOOL 1 "2016-08-05" "Augeas 1.5.0" "Augeas"
137 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 augtool \- inspect and modify configuration files
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 augtool [\s-1OPTIONS\s0] [\s-1COMMAND\s0]
146 .SH "DESCRIPTION"
147 .IX Header "DESCRIPTION"
148 Augeas is a configuration editing tool. It parses configuration files
149 in their native formats and transforms them into a tree. Configuration
150 changes are made by manipulating this tree and saving it back into
151 native config files.
152 .PP
153 augtool provides a command line interface to the generated tree. \s-1COMMAND\s0
154 can be a single command as described under \*(L"\s-1COMMANDS\*(R"\s0. When called with
155 no \s-1COMMAND,\s0 it reads commands from standard input until an end-of-file is
156 encountered.
157 .SH "OPTIONS"
158 .IX Header "OPTIONS"
159 .IP "\fB\-c\fR, \fB\-\-typecheck\fR" 4
160 .IX Item "-c, --typecheck"
161 Typecheck lenses. This can be very slow, and is therefore not done by
162 default, but is highly recommended during development.
163 .IP "\fB\-b\fR, \fB\-\-backup\fR" 4
164 .IX Item "-b, --backup"
165 When files are changed, preserve the originals in a file with extension
166 \&'.augsave'
167 .IP "\fB\-n\fR, \fB\-\-new\fR" 4
168 .IX Item "-n, --new"
169 Save changes in files with extension '.augnew', do not modify the original
170 files
171 .IP "\fB\-r\fR, \fB\-\-root\fR=\fI\s-1ROOT\s0\fR" 4
172 .IX Item "-r, --root=ROOT"
173 Use directory \s-1ROOT\s0 as the root of the filesystem. Takes precedence over a
174 root set with the \s-1AUGEAS_ROOT\s0 environment variable.
175 .IP "\fB\-I\fR, \fB\-\-include\fR=\fI\s-1DIR\s0\fR" 4
176 .IX Item "-I, --include=DIR"
177 Add \s-1DIR\s0 to the module loadpath. Can be given multiple times. The
178 directories set here are searched before any directories specified in the
179 \&\s-1AUGEAS_LENS_LIB\s0 environment variable, and before the default directories
180 \&\fI/usr/share/augeas/lenses\fR and \fI/usr/share/augeas/lenses/dist\fR.
181 .IP "\fB\-t\fR, \fB\-\-transform\fR=\fI\s-1XFM\s0\fR" 4
182 .IX Item "-t, --transform=XFM"
183 Add a file transform; uses the 'transform' command syntax,
184 e.g. \f(CW\*(C`\-t \*(AqFstab incl /etc/fstab.bak\*(Aq\*(C'\fR.
185 .IP "\fB\-l\fR, \fB\-\-load\-file\fR=\fI\s-1FILE\s0\fR" 4
186 .IX Item "-l, --load-file=FILE"
187 Load an individual \s-1FILE\s0 into the tree. The lens to use is determined
188 automatically (based on autoload information in the lenses) and will be the
189 same that is used for this file when the entire tree is loaded. The option
190 can be specified multiple times to load several files, e.g. \f(CW\*(C`\-l /etc/fstab
191 \&\-l /etc/hosts\*(C'\fR. This lens implies \f(CW\*(C`\-\-noload\*(C'\fR so that only the files
192 specified with this option will be loaded.
193 .IP "\fB\-f\fR, \fB\-\-file\fR=\fI\s-1FILE\s0\fR" 4
194 .IX Item "-f, --file=FILE"
195 Read commands from \s-1FILE.\s0
196 .IP "\fB\-i\fR, \fB\-\-interactive\fR" 4
197 .IX Item "-i, --interactive"
198 Read commands from the terminal. When combined with \fB\-f\fR or redirection of
199 stdin, drop into an interactive session after executing the commands from
200 the file.
201 .IP "\fB\-e\fR, \fB\-\-echo\fR" 4
202 .IX Item "-e, --echo"
203 When reading commands from a file via stdin, echo the commands before
204 printing their output.
205 .IP "\fB\-s\fR, \fB\-\-autosave\fR" 4
206 .IX Item "-s, --autosave"
207 Automatically save all changes at the end of the session.
208 .IP "\fB\-S\fR, \fB\-\-nostdinc\fR" 4
209 .IX Item "-S, --nostdinc"
210 Do not search any of the default directories for modules. When this option
211 is set, only directories specified explicitly with \fB\-I\fR or specified in
212 \&\fB\s-1AUGEAS_LENS_LIB\s0\fR will be searched for modules.
213 .IP "\fB\-L\fR, \fB\-\-noload\fR" 4
214 .IX Item "-L, --noload"
215 Do not load any files on startup. This is generally used to fine-tune which
216 files to load by modifying the entries in \f(CW\*(C`/augeas/load\*(C'\fR and then issuing
217 a \f(CW\*(C`load\*(C'\fR command.
218 .IP "\fB\-A\fR, \fB\-\-noautoload\fR" 4
219 .IX Item "-A, --noautoload"
220 Do not load any lens modules, and therefore no files, on startup. This
221 creates no entries under \f(CW\*(C`/augeas/load\*(C'\fR whatsoever; to read any files,
222 they need to be set up manually and loading must be initiated with a
223 \&\f(CW\*(C`load\*(C'\fR command. Using this option gives the fastest startup.
224 .IP "\fB\-\-span\fR" 4
225 .IX Item "--span"
226 Load span positions for nodes in the tree, as they relate to the original
227 file. Enables the use of the \fBspan\fR command to retrieve position data.
228 .IP "\fB\-\-timing\fR" 4
229 .IX Item "--timing"
230 After executing each command, print how long, in milliseconds, executing
231 the command took. This makes it easier to spot slow queries, usually
232 through \fBmatch\fR commands, and allows exploring alternative queries that
233 yield the same result but might be faster.
234 .IP "\fB\-\-version\fR" 4
235 .IX Item "--version"
236 Print version information and exit. The version is also in the tree under
237 \&\f(CW\*(C`/augeas/version\*(C'\fR.
238 .SH "COMMANDS"
239 .IX Header "COMMANDS"
240 In interactive mode, commands and paths can be completed by pressing \f(CW\*(C`TAB\*(C'\fR.
241 .PP
242 The paths accepted as arguments by commands use a small subset of XPath
243 path expressions. A path expression consists of a number of segments,
244 separated by \f(CW\*(C`/\*(C'\fR. In each segment, the character \f(CW\*(C`*\*(C'\fR can be used to match
245 every node regardless of its label. Sibling nodes with identical labels can
246 be distinguished by appending \f(CW\*(C`[N]\*(C'\fR to their label to match the N\-th
247 sibling with such a label. The last sibling with a specific label can be
248 reached as \f(CW\*(C`[last()]\*(C'\fR. See \*(L"\s-1EXAMPLES\*(R"\s0 for some examples of this.
249 .SS "\s-1ADMIN COMMANDS\s0"
250 .IX Subsection "ADMIN COMMANDS"
251 The following commands control the behavior of Augeas and augtool itself.
252 .IP "\fBhelp\fR" 4
253 .IX Item "help"
254 Print this help text
255 .IP "\fBload\fR" 4
256 .IX Item "load"
257 Load files according to the transforms in \f(CW\*(C`/augeas/load\*(C'\fR.
258 .IP "\fBquit\fR" 4
259 .IX Item "quit"
260 Exit the program
261 .IP "\fBretrieve\fR <\s-1LENS\s0> <\s-1NODE_IN\s0> <\s-1PATH\s0> <\s-1NODE_OUT\s0>" 4
262 .IX Item "retrieve <LENS> <NODE_IN> <PATH> <NODE_OUT>"
263 Transform tree at \s-1PATH\s0 back into text using lens \s-1LENS\s0 and store the
264 resulting string at \s-1NODE_OUT.\s0 Assume that the tree was initially read in
265 with the same lens and the string stored at \s-1NODE_IN\s0 as input.
266 .IP "\fBsave\fR" 4
267 .IX Item "save"
268 Save all pending changes to disk. Unless either the \fB\-b\fR or \fB\-n\fR
269 command line options are given, files are changed in place.
270 .IP "\fBstore\fR <\s-1LENS\s0> <\s-1NODE\s0> <\s-1PATH\s0>" 4
271 .IX Item "store <LENS> <NODE> <PATH>"
272 Parse \s-1NODE\s0 using \s-1LENS\s0 and store the resulting tree at \s-1PATH.\s0
273 .IP "\fBtransform\fR <\s-1LENS\s0> <\s-1FILTER\s0> <\s-1FILE\s0>" 4
274 .IX Item "transform <LENS> <FILTER> <FILE>"
275 Add a transform for \s-1FILE\s0 using \s-1LENS.\s0 The \s-1LENS\s0 may be a module name or a
276 full lens name.  If a module name is given, then \*(L"lns\*(R" will be the lens
277 assumed.  The \s-1FILTER\s0 must be either \*(L"incl\*(R" or \*(L"excl\*(R".  If the filter is
278 \&\*(L"incl\*(R",  the \s-1FILE\s0 will be parsed by the \s-1LENS. \s0 If the filter is \*(L"excl\*(R",
279 the \s-1FILE\s0 will be excluded from the \s-1LENS. FILE\s0 may contain wildcards.
280 .IP "\fBload-file\fR <\s-1FILE\s0>" 4
281 .IX Item "load-file <FILE>"
282 Load a specific \s-1FILE,\s0 automatically determining the proper lens from the
283 information in \fI/augeas/load\fR; without further intervention, the lens that
284 would oridnarily be used for this file will be used.
285 .SS "\s-1READ COMMANDS\s0"
286 .IX Subsection "READ COMMANDS"
287 The following commands are used to retrieve data from the Augeas tree.
288 .IP "\fBdump-xml\fR \fI[<\s-1PATH\s0>]\fR" 4
289 .IX Item "dump-xml [<PATH>]"
290 Print entries in the tree as \s-1XML.\s0 If \s-1PATH\s0 is given, printing starts there,
291 otherwise the whole tree is printed.
292 .IP "\fBget\fR <\s-1PATH\s0>" 4
293 .IX Item "get <PATH>"
294 Print the value associated with \s-1PATH\s0
295 .IP "\fBlabel\fR <\s-1PATH\s0>" 4
296 .IX Item "label <PATH>"
297 Get and print the label associated with \s-1PATH\s0
298 .IP "\fBls\fR <\s-1PATH\s0>" 4
299 .IX Item "ls <PATH>"
300 List the direct children of \s-1PATH\s0
301 .IP "\fBmatch\fR <\s-1PATTERN\s0> [<\s-1VALUE\s0>]" 4
302 .IX Item "match <PATTERN> [<VALUE>]"
303 Find all paths that match \s-1PATTERN.\s0 If \s-1VALUE\s0 is given, only the matching
304 paths whose value equals \s-1VALUE\s0 are printed
305 .IP "\fBprint\fR \fI[<\s-1PATH\s0>]\fR" 4
306 .IX Item "print [<PATH>]"
307 Print entries in the tree. If \s-1PATH\s0 is given, printing starts there,
308 otherwise the whole tree is printed
309 .IP "\fBspan\fR <\s-1PATH\s0>" 4
310 .IX Item "span <PATH>"
311 Print the name of the file from which the node \s-1PATH\s0 was generated, as well
312 as information about the positions in the file corresponding to the label,
313 the value, and the entire node. \s-1PATH\s0 must match exactly one node.
314 .Sp
315 You need to run 'set /augeas/span enable' prior to loading files to enable
316 recording of span information. It is disabled by default.
317 .SS "\s-1WRITE COMMANDS\s0"
318 .IX Subsection "WRITE COMMANDS"
319 The following commands are used to modify the Augeas tree.
320 .IP "\fBclear\fR <\s-1PATH\s0>" 4
321 .IX Item "clear <PATH>"
322 Set the value for \s-1PATH\s0 to \s-1NULL.\s0 If \s-1PATH\s0 is not in the tree yet, it and all
323 its ancestors will be created.
324 .IP "\fBclearm\fR <\s-1BASE\s0> <\s-1SUB\s0>" 4
325 .IX Item "clearm <BASE> <SUB>"
326 Clear multiple nodes values in one operation. Find or create a node matching \s-1SUB\s0
327 by interpreting \s-1SUB\s0 as a path expression relative to each node matching
328 \&\s-1BASE.\s0 If \s-1SUB\s0 is '.', the nodes matching \s-1BASE\s0 will be modified.
329 .IP "\fBins\fR \fI<\s-1LABEL\s0>\fR \fI<\s-1WHERE\s0>\fR \fI<\s-1PATH\s0>\fR" 4
330 .IX Item "ins <LABEL> <WHERE> <PATH>"
331 Insert a new node with label \s-1LABEL\s0 right before or after \s-1PATH\s0 into the
332 tree. \s-1WHERE\s0 must be either 'before' or 'after'.
333 .IP "\fBinsert\fR \fI<\s-1LABEL\s0>\fR \fI<\s-1WHERE\s0>\fR \fI<\s-1PATH\s0>\fR" 4
334 .IX Item "insert <LABEL> <WHERE> <PATH>"
335 Alias of \fBins\fR.
336 .IP "\fBmv\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
337 .IX Item "mv <SRC> <DST>"
338 Move node \s-1SRC\s0 to \s-1DST. SRC\s0 must match exactly one node in the tree.  \s-1DST\s0
339 must either match exactly one node in the tree, or may not exist yet. If
340 \&\s-1DST\s0 exists already, it and all its descendants are deleted. If \s-1DST\s0 does not
341 exist yet, it and all its missing ancestors are created.
342 .IP "\fBmove\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
343 .IX Item "move <SRC> <DST>"
344 Alias of \fBmv\fR.
345 .IP "\fBcp\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
346 .IX Item "cp <SRC> <DST>"
347 Copy node \s-1SRC\s0 to \s-1DST. SRC\s0 must match exactly one node in the tree.  \s-1DST\s0
348 must either match exactly one node in the tree, or may not exist yet. If
349 \&\s-1DST\s0 exists already, it and all its descendants are deleted. If \s-1DST\s0 does not
350 exist yet, it and all its missing ancestors are created.
351 .IP "\fBcopy\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
352 .IX Item "copy <SRC> <DST>"
353 Alias of \fBcp\fR.
354 .IP "\fBrename\fR <\s-1SRC\s0> <\s-1LBL\s0>" 4
355 .IX Item "rename <SRC> <LBL>"
356 Rename the label of all nodes matching \s-1SRC\s0 to \s-1LBL.\s0
357 .IP "\fBrm\fR <\s-1PATH\s0>" 4
358 .IX Item "rm <PATH>"
359 Delete \s-1PATH\s0 and all its children from the tree
360 .IP "\fBset\fR <\s-1PATH\s0> <\s-1VALUE\s0>" 4
361 .IX Item "set <PATH> <VALUE>"
362 Associate \s-1VALUE\s0 with \s-1PATH.\s0 If \s-1PATH\s0 is not in the tree yet,
363 it and all its ancestors will be created.
364 .IP "\fBsetm\fR <\s-1BASE\s0> <\s-1SUB\s0> [<\s-1VALUE\s0>]" 4
365 .IX Item "setm <BASE> <SUB> [<VALUE>]"
366 Set multiple nodes in one operation.  Find or create a node matching \s-1SUB\s0 by
367 interpreting \s-1SUB\s0 as a path expression relative to each node matching
368 \&\s-1BASE.\s0 If \s-1SUB\s0 is '.', the nodes matching \s-1BASE\s0 will be modified.
369 .IP "\fBtouch\fR <\s-1PATH\s0>" 4
370 .IX Item "touch <PATH>"
371 Create \s-1PATH\s0 with the value \s-1NULL\s0 if it is not in the tree yet.  All its
372 ancestors will also be created.  These new tree entries will appear
373 last amongst their siblings.
374 .SS "\s-1PATH EXPRESSION COMMANDS\s0"
375 .IX Subsection "PATH EXPRESSION COMMANDS"
376 The following commands help when working with path expressions.
377 .IP "\fBdefnode\fR <\s-1NAME\s0> <\s-1EXPR\s0> [<\s-1VALUE\s0>]" 4
378 .IX Item "defnode <NAME> <EXPR> [<VALUE>]"
379 Define the variable \s-1NAME\s0 to the result of evaluating \s-1EXPR,\s0 which must be a
380 nodeset. If no node matching \s-1EXPR\s0 exists yet, one is created and \s-1NAME\s0 will
381 refer to it. If \s-1VALUE\s0 is given, this is the same as 'set \s-1EXPR VALUE\s0'; if
382 \&\s-1VALUE\s0 is not given, the node is created as if with 'clear \s-1EXPR\s0' would and
383 \&\s-1NAME\s0 refers to that node.
384 .IP "\fBdefvar\fR <\s-1NAME\s0> <\s-1EXPR\s0>" 4
385 .IX Item "defvar <NAME> <EXPR>"
386 Define the variable \s-1NAME\s0 to the result of evaluating \s-1EXPR.\s0 The variable
387 can be used in path expressions as \f(CW$NAME\fR. Note that \s-1EXPR\s0 is evaluated when
388 the variable is defined, not when it is used.
389 .SH "ENVIRONMENT VARIABLES"
390 .IX Header "ENVIRONMENT VARIABLES"
391 .IP "\fB\s-1AUGEAS_ROOT\s0\fR" 4
392 .IX Item "AUGEAS_ROOT"
393 The file system root, defaults to '/'. Can be overridden with
394 the \fB\-r\fR command line option
395 .IP "\fB\s-1AUGEAS_LENS_LIB\s0\fR" 4
396 .IX Item "AUGEAS_LENS_LIB"
397 Colon separated list of directories with lenses. Directories specified here
398 are searched after any directories set with the \fB\-I\fR command line option,
399 but before the default directories \fI/usr/share/augeas/lenses\fR and
400 \&\fI/usr/share/augeas/lenses/dist\fR
401 .SH "DIAGNOSTICS"
402 .IX Header "DIAGNOSTICS"
403 Normally, exit status is 0. If one or more commands fail, the exit status
404 is set to a non-zero value.
405 .PP
406 Note though that failure to load some of the files specified by transforms
407 in \f(CW\*(C`/augeas/load\*(C'\fR is not considered a failure. If it is important to know
408 that all files were loaded, you need to issue a \f(CW\*(C`match /augeas//error\*(C'\fR
409 after loading to find out details about what files could not be loaded and
410 why.
411 .SH "EXAMPLES"
412 .IX Header "EXAMPLES"
413 .Vb 2
414 \&  # command line mode
415 \&  augtool print /files/etc/hosts/
416 \&
417 \&  # interactive mode
418 \&  augtool
419 \&  augtool> help
420 \&  augtool> print /files/etc/hosts/
421 \&
422 \&  # Print the third entry from the second AcceptEnv line
423 \&  augtool print \*(Aq/files/etc/ssh/sshd_config/AcceptEnv[2]/3\*(Aq
424 \&
425 \&  # Find the entry in inittab with action \*(Aqinitdefault\*(Aq
426 \&  augtool> match /files/etc/inittab/*/action initdefault
427 \&
428 \&  # Print the last alias for each entry in /etc/hosts
429 \&  augtool> print /files/etc/hosts/*/alias[last()]
430 .Ve
431 .SH "FILES"
432 .IX Header "FILES"
433 Lenses and schema definitions in \fI/usr/share/augeas/lenses\fR and
434 \&\fI/usr/share/augeas/lenses/dist\fR
435 .SH "AUTHOR"
436 .IX Header "AUTHOR"
437 David Lutterkort <lutter@watzmann.net>
438 .SH "COPYRIGHT AND LICENSE"
439 .IX Header "COPYRIGHT AND LICENSE"
440 Copyright 2007\-2016 David Lutterkort
441 .PP
442 Augeas (and augtool) are distributed under the \s-1GNU\s0 Lesser General Public
443 License (\s-1LGPL\s0)
444 .SH "SEE ALSO"
445 .IX Header "SEE ALSO"
446 \&\fBAugeas\fR project homepage <http://www.augeas.net/>
447 .PP
448 augparse