Imported Upstream version 1.5.0
[platform/upstream/augeas.git] / man / augtool.1
1 .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29)
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 "2015-10-03" "Augeas 1.4.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\-f\fR, \fB\-\-file\fR=\fI\s-1FILE\s0\fR" 4
186 .IX Item "-f, --file=FILE"
187 Read commands from \s-1FILE.\s0
188 .IP "\fB\-i\fR, \fB\-\-interactive\fR" 4
189 .IX Item "-i, --interactive"
190 Read commands from the terminal. When combined with \fB\-f\fR or redirection of
191 stdin, drop into an interactive session after executing the commands from
192 the file.
193 .IP "\fB\-e\fR, \fB\-\-echo\fR" 4
194 .IX Item "-e, --echo"
195 When reading commands from a file via stdin, echo the commands before
196 printing their output.
197 .IP "\fB\-s\fR, \fB\-\-autosave\fR" 4
198 .IX Item "-s, --autosave"
199 Automatically save all changes at the end of the session.
200 .IP "\fB\-S\fR, \fB\-\-nostdinc\fR" 4
201 .IX Item "-S, --nostdinc"
202 Do not search any of the default directories for modules. When this option
203 is set, only directories specified explicitly with \fB\-I\fR or specified in
204 \&\fB\s-1AUGEAS_LENS_LIB\s0\fR will be searched for modules.
205 .IP "\fB\-L\fR, \fB\-\-noload\fR" 4
206 .IX Item "-L, --noload"
207 Do not load any files on startup. This is generally used to fine-tune which
208 files to load by modifying the entries in \f(CW\*(C`/augeas/load\*(C'\fR and then issuing
209 a \f(CW\*(C`load\*(C'\fR command.
210 .IP "\fB\-A\fR, \fB\-\-noautoload\fR" 4
211 .IX Item "-A, --noautoload"
212 Do not load any lens modules, and therefore no files, on startup. This
213 creates no entries under \f(CW\*(C`/augeas/load\*(C'\fR whatsoever; to read any files,
214 they need to be set up manually and loading must be initiated with a
215 \&\f(CW\*(C`load\*(C'\fR command. Using this option gives the fastest startup.
216 .IP "\fB\-\-span\fR" 4
217 .IX Item "--span"
218 Load span positions for nodes in the tree, as they relate to the original
219 file. Enables the use of the \fBspan\fR command to retrieve position data.
220 .IP "\fB\-\-timing\fR" 4
221 .IX Item "--timing"
222 After executing each command, print how long, in milliseconds, executing
223 the command took. This makes it easier to spot slow queries, usually
224 through \fBmatch\fR commands, and allows exploring alternative queries that
225 yield the same result but might be faster.
226 .IP "\fB\-\-version\fR" 4
227 .IX Item "--version"
228 Print version information and exit. The version is also in the tree under
229 \&\f(CW\*(C`/augeas/version\*(C'\fR.
230 .SH "COMMANDS"
231 .IX Header "COMMANDS"
232 In interactive mode, commands and paths can be completed by pressing \f(CW\*(C`TAB\*(C'\fR.
233 .PP
234 The paths accepted as arguments by commands use a small subset of XPath
235 path expressions. A path expression consists of a number of segments,
236 separated by \f(CW\*(C`/\*(C'\fR. In each segment, the character \f(CW\*(C`*\*(C'\fR can be used to match
237 every node regardless of its label. Sibling nodes with identical labels can
238 be distinguished by appending \f(CW\*(C`[N]\*(C'\fR to their label to match the N\-th
239 sibling with such a label. The last sibling with a specific label can be
240 reached as \f(CW\*(C`[last()]\*(C'\fR. See \*(L"\s-1EXAMPLES\*(R"\s0 for some examples of this.
241 .SS "\s-1ADMIN COMMANDS\s0"
242 .IX Subsection "ADMIN COMMANDS"
243 The following commands control the behavior of Augeas and augtool itself.
244 .IP "\fBhelp\fR" 4
245 .IX Item "help"
246 Print this help text
247 .IP "\fBload\fR" 4
248 .IX Item "load"
249 Load files according to the transforms in \f(CW\*(C`/augeas/load\*(C'\fR.
250 .IP "\fBquit\fR" 4
251 .IX Item "quit"
252 Exit the program
253 .IP "\fBretrieve\fR <\s-1LENS\s0> <\s-1NODE_IN\s0> <\s-1PATH\s0> <\s-1NODE_OUT\s0>" 4
254 .IX Item "retrieve <LENS> <NODE_IN> <PATH> <NODE_OUT>"
255 Transform tree at \s-1PATH\s0 back into text using lens \s-1LENS\s0 and store the
256 resulting string at \s-1NODE_OUT.\s0 Assume that the tree was initially read in
257 with the same lens and the string stored at \s-1NODE_IN\s0 as input.
258 .IP "\fBsave\fR" 4
259 .IX Item "save"
260 Save all pending changes to disk. Unless either the \fB\-b\fR or \fB\-n\fR
261 command line options are given, files are changed in place.
262 .IP "\fBstore\fR <\s-1LENS\s0> <\s-1NODE\s0> <\s-1PATH\s0>" 4
263 .IX Item "store <LENS> <NODE> <PATH>"
264 Parse \s-1NODE\s0 using \s-1LENS\s0 and store the resulting tree at \s-1PATH.\s0
265 .IP "\fBtransform\fR <\s-1LENS\s0> <\s-1FILTER\s0> <\s-1FILE\s0>" 4
266 .IX Item "transform <LENS> <FILTER> <FILE>"
267 Add a transform for \s-1FILE\s0 using \s-1LENS.\s0 The \s-1LENS\s0 may be a module name or a
268 full lens name.  If a module name is given, then \*(L"lns\*(R" will be the lens
269 assumed.  The \s-1FILTER\s0 must be either \*(L"incl\*(R" or \*(L"excl\*(R".  If the filter is
270 \&\*(L"incl\*(R",  the \s-1FILE\s0 will be parsed by the \s-1LENS. \s0 If the filter is \*(L"excl\*(R",
271 the \s-1FILE\s0 will be excluded from the \s-1LENS. FILE\s0 may contain wildcards.
272 .SS "\s-1READ COMMANDS\s0"
273 .IX Subsection "READ COMMANDS"
274 The following commands are used to retrieve data from the Augeas tree.
275 .IP "\fBdump-xml\fR \fI[<\s-1PATH\s0>]\fR" 4
276 .IX Item "dump-xml [<PATH>]"
277 Print entries in the tree as \s-1XML.\s0 If \s-1PATH\s0 is given, printing starts there,
278 otherwise the whole tree is printed.
279 .IP "\fBget\fR <\s-1PATH\s0>" 4
280 .IX Item "get <PATH>"
281 Print the value associated with \s-1PATH\s0
282 .IP "\fBlabel\fR <\s-1PATH\s0>" 4
283 .IX Item "label <PATH>"
284 Get and print the label associated with \s-1PATH\s0
285 .IP "\fBls\fR <\s-1PATH\s0>" 4
286 .IX Item "ls <PATH>"
287 List the direct children of \s-1PATH\s0
288 .IP "\fBmatch\fR <\s-1PATTERN\s0> [<\s-1VALUE\s0>]" 4
289 .IX Item "match <PATTERN> [<VALUE>]"
290 Find all paths that match \s-1PATTERN.\s0 If \s-1VALUE\s0 is given, only the matching
291 paths whose value equals \s-1VALUE\s0 are printed
292 .IP "\fBprint\fR \fI[<\s-1PATH\s0>]\fR" 4
293 .IX Item "print [<PATH>]"
294 Print entries in the tree. If \s-1PATH\s0 is given, printing starts there,
295 otherwise the whole tree is printed
296 .IP "\fBspan\fR <\s-1PATH\s0>" 4
297 .IX Item "span <PATH>"
298 Print the name of the file from which the node \s-1PATH\s0 was generated, as well
299 as information about the positions in the file corresponding to the label,
300 the value, and the entire node. \s-1PATH\s0 must match exactly one node.
301 .Sp
302 You need to run 'set /augeas/span enable' prior to loading files to enable
303 recording of span information. It is disabled by default.
304 .SS "\s-1WRITE COMMANDS\s0"
305 .IX Subsection "WRITE COMMANDS"
306 The following commands are used to modify the Augeas tree.
307 .IP "\fBclear\fR <\s-1PATH\s0>" 4
308 .IX Item "clear <PATH>"
309 Set the value for \s-1PATH\s0 to \s-1NULL.\s0 If \s-1PATH\s0 is not in the tree yet, it and all
310 its ancestors will be created.
311 .IP "\fBclearm\fR <\s-1BASE\s0> <\s-1SUB\s0>" 4
312 .IX Item "clearm <BASE> <SUB>"
313 Clear multiple nodes values in one operation. Find or create a node matching \s-1SUB\s0
314 by interpreting \s-1SUB\s0 as a path expression relative to each node matching
315 \&\s-1BASE.\s0 If \s-1SUB\s0 is '.', the nodes matching \s-1BASE\s0 will be modified.
316 .IP "\fBins\fR \fI<\s-1LABEL\s0>\fR \fI<\s-1WHERE\s0>\fR \fI<\s-1PATH\s0>\fR" 4
317 .IX Item "ins <LABEL> <WHERE> <PATH>"
318 Insert a new node with label \s-1LABEL\s0 right before or after \s-1PATH\s0 into the
319 tree. \s-1WHERE\s0 must be either 'before' or 'after'.
320 .IP "\fBinsert\fR \fI<\s-1LABEL\s0>\fR \fI<\s-1WHERE\s0>\fR \fI<\s-1PATH\s0>\fR" 4
321 .IX Item "insert <LABEL> <WHERE> <PATH>"
322 Alias of \fBins\fR.
323 .IP "\fBmv\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
324 .IX Item "mv <SRC> <DST>"
325 Move node \s-1SRC\s0 to \s-1DST. SRC\s0 must match exactly one node in the tree.  \s-1DST\s0
326 must either match exactly one node in the tree, or may not exist yet. If
327 \&\s-1DST\s0 exists already, it and all its descendants are deleted. If \s-1DST\s0 does not
328 exist yet, it and all its missing ancestors are created.
329 .IP "\fBmove\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
330 .IX Item "move <SRC> <DST>"
331 Alias of \fBmv\fR.
332 .IP "\fBcp\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
333 .IX Item "cp <SRC> <DST>"
334 Copy node \s-1SRC\s0 to \s-1DST. SRC\s0 must match exactly one node in the tree.  \s-1DST\s0
335 must either match exactly one node in the tree, or may not exist yet. If
336 \&\s-1DST\s0 exists already, it and all its descendants are deleted. If \s-1DST\s0 does not
337 exist yet, it and all its missing ancestors are created.
338 .IP "\fBcopy\fR <\s-1SRC\s0> <\s-1DST\s0>" 4
339 .IX Item "copy <SRC> <DST>"
340 Alias of \fBcp\fR.
341 .IP "\fBrename\fR <\s-1SRC\s0> <\s-1LBL\s0>" 4
342 .IX Item "rename <SRC> <LBL>"
343 Rename the label of all nodes matching \s-1SRC\s0 to \s-1LBL.\s0
344 .IP "\fBrm\fR <\s-1PATH\s0>" 4
345 .IX Item "rm <PATH>"
346 Delete \s-1PATH\s0 and all its children from the tree
347 .IP "\fBset\fR <\s-1PATH\s0> <\s-1VALUE\s0>" 4
348 .IX Item "set <PATH> <VALUE>"
349 Associate \s-1VALUE\s0 with \s-1PATH.\s0 If \s-1PATH\s0 is not in the tree yet,
350 it and all its ancestors will be created.
351 .IP "\fBsetm\fR <\s-1BASE\s0> <\s-1SUB\s0> [<\s-1VALUE\s0>]" 4
352 .IX Item "setm <BASE> <SUB> [<VALUE>]"
353 Set multiple nodes in one operation.  Find or create a node matching \s-1SUB\s0 by
354 interpreting \s-1SUB\s0 as a path expression relative to each node matching
355 \&\s-1BASE.\s0 If \s-1SUB\s0 is '.', the nodes matching \s-1BASE\s0 will be modified.
356 .IP "\fBtouch\fR <\s-1PATH\s0>" 4
357 .IX Item "touch <PATH>"
358 Create \s-1PATH\s0 with the value \s-1NULL\s0 if it is not in the tree yet.  All its
359 ancestors will also be created.  These new tree entries will appear
360 last amongst their siblings.
361 .SS "\s-1PATH EXPRESSION COMMANDS\s0"
362 .IX Subsection "PATH EXPRESSION COMMANDS"
363 The following commands help when working with path expressions.
364 .IP "\fBdefnode\fR <\s-1NAME\s0> <\s-1EXPR\s0> [<\s-1VALUE\s0>]" 4
365 .IX Item "defnode <NAME> <EXPR> [<VALUE>]"
366 Define the variable \s-1NAME\s0 to the result of evaluating \s-1EXPR,\s0 which must be a
367 nodeset. If no node matching \s-1EXPR\s0 exists yet, one is created and \s-1NAME\s0 will
368 refer to it. If \s-1VALUE\s0 is given, this is the same as 'set \s-1EXPR VALUE\s0'; if
369 \&\s-1VALUE\s0 is not given, the node is created as if with 'clear \s-1EXPR\s0' would and
370 \&\s-1NAME\s0 refers to that node.
371 .IP "\fBdefvar\fR <\s-1NAME\s0> <\s-1EXPR\s0>" 4
372 .IX Item "defvar <NAME> <EXPR>"
373 Define the variable \s-1NAME\s0 to the result of evaluating \s-1EXPR.\s0 The variable
374 can be used in path expressions as \f(CW$NAME\fR. Note that \s-1EXPR\s0 is evaluated when
375 the variable is defined, not when it is used.
376 .SH "ENVIRONMENT VARIABLES"
377 .IX Header "ENVIRONMENT VARIABLES"
378 .IP "\fB\s-1AUGEAS_ROOT\s0\fR" 4
379 .IX Item "AUGEAS_ROOT"
380 The file system root, defaults to '/'. Can be overridden with
381 the \fB\-r\fR command line option
382 .IP "\fB\s-1AUGEAS_LENS_LIB\s0\fR" 4
383 .IX Item "AUGEAS_LENS_LIB"
384 Colon separated list of directories with lenses. Directories specified here
385 are searched after any directories set with the \fB\-I\fR command line option,
386 but before the default directories \fI/usr/share/augeas/lenses\fR and
387 \&\fI/usr/share/augeas/lenses/dist\fR
388 .SH "DIAGNOSTICS"
389 .IX Header "DIAGNOSTICS"
390 Normally, exit status is 0. If one or more commands fail, the exit status
391 is set to a non-zero value.
392 .PP
393 Note though that failure to load some of the files specified by transforms
394 in \f(CW\*(C`/augeas/load\*(C'\fR is not considered a failure. If it is important to know
395 that all files were loaded, you need to issue a \f(CW\*(C`match /augeas//error\*(C'\fR
396 after loading to find out details about what files could not be loaded and
397 why.
398 .SH "EXAMPLES"
399 .IX Header "EXAMPLES"
400 .Vb 2
401 \&  # command line mode
402 \&  augtool print /files/etc/hosts/
403 \&
404 \&  # interactive mode
405 \&  augtool
406 \&  augtool> help
407 \&  augtool> print /files/etc/hosts/
408 \&
409 \&  # Print the third entry from the second AcceptEnv line
410 \&  augtool print \*(Aq/files/etc/ssh/sshd_config/AcceptEnv[2]/3\*(Aq
411 \&
412 \&  # Find the entry in inittab with action \*(Aqinitdefault\*(Aq
413 \&  augtool> match /files/etc/inittab/*/action initdefault
414 \&
415 \&  # Print the last alias for each entry in /etc/hosts
416 \&  augtool> print /files/etc/hosts/*/alias[last()]
417 .Ve
418 .SH "FILES"
419 .IX Header "FILES"
420 Lenses and schema definitions in \fI/usr/share/augeas/lenses\fR and
421 \&\fI/usr/share/augeas/lenses/dist\fR
422 .SH "AUTHOR"
423 .IX Header "AUTHOR"
424 David Lutterkort <lutter@watzmann.net>
425 .SH "COPYRIGHT AND LICENSE"
426 .IX Header "COPYRIGHT AND LICENSE"
427 Copyright 2007\-2015 David Lutterkort
428 .PP
429 Augeas (and augtool) are distributed under the \s-1GNU\s0 Lesser General Public
430 License (\s-1LGPL\s0)
431 .SH "SEE ALSO"
432 .IX Header "SEE ALSO"
433 \&\fBAugeas\fR project homepage <http://www.augeas.net/>
434 .PP
435 augparse