Rechercher une page de manuel
augtool
Langue: en
Version: 2008-08-07 (ubuntu - 07/07/09)
Section: 1 (Commandes utilisateur)
Sommaire
NAME
augtool - inspect and modify configuration filesSYNOPSIS
augtool [OPTIONS] [COMMAND]DESCRIPTION
Augeas is a configuration editing tool. It parses configuration files in their native formats and transforms them into a tree. Configuration changes are made by manipulating this tree and saving it back into native config files.augtool provides a command line interface to the generated tree. COMMAND can be a single command as described under ``COMMANDS''. When called with no COMMAND, it reads commands from standard input until an end-of-file is encountered.
OPTIONS
- -c
- Typecheck lenses. This can be very slow, and is therefore not done by default, but is highly recommended during development.
- -b
- When files are changed, preserve the originals in a file with extension '.augsave'
- -n
- Save changes in files with extension '.augnew', do not modify the original files
- -r ROOT
- Use directory ROOT as the root of the filesystem. Takes precedence over a root set with the AUGEAS_ROOT environment variable.
- -I DIR
- Add DIR to the module loadpath. Can be given multiple times. The directories set here are searched before any directories specified in the AUGEAS_LENS_LIB environment variable, and before the default directory /usr/share/augeas/lenses.
COMMANDS
In interactive mode, commands and paths can be completed by pressing "TAB".The paths accepted as arguments by commands use a small subset of XPath path expressions. A path expression consists of a number of segments, separated by "/". In each segment, the character "*" can be used to match every node regardless of its label. Sibling nodes with identical labels can be distinguished by appending "[N]" to their label to match the N-th sibling with such a label. The last sibling with a specific label can be reached as "[last()]". See ``EXAMPLES'' for some examples of this.
- exit, quit
- Exit the program
- ls <PATH>
- List the direct children of PATH
- match <PATTERN> [<VALUE>]
- Find all paths that match PATTERN. If VALUE is given, only the matching paths whose value equals VALUE are printed
- rm <PATH>
- Delete PATH and all its children from the tree
- set <PATH> <VALUE>
- Associate VALUE with PATH. If PATH is not in the tree yet, it and all its ancestors will be created.
- clear <PATH>
- Set the value for PATH to NULL. If PATH is not in the tree yet, it and all its ancestors will be created.
- get <PATH>
- Print the value associated with PATH
- print [<PATH>]
- Print entries in the tree. If PATH is given, printing starts there, otherwise the whole tree is printed
- ins <LABEL> <WHERE> <PATH>
- Insert a new node with label LABEL right before or after PATH into the tree. WHERE must be either 'before' or 'after'.
- save
- Save all pending changes to disk. Unless either the -b or -n command line options are given, files are changed in place.
- help
- Print this help text
ENVIRONMENT VARIABLES
- AUGEAS_ROOT
- The file system root, defaults to '/'. Can be overridden with the -r command line option
- AUGEAS_LENS_LIB
- Colon separated list of directories with lenses. Directories specified here are searched after any directories set with the -I command line option, but before the default directory /usr/share/augeas/lenses
DIAGNOSTICS
Normally, exit status is 0. If one or more commands fail, the exit status is set to a non-zero value.EXAMPLES
# command line mode augtool print /files/etc/hosts/ # interactive mode augtool augtool> help augtool> print /files/etc/hosts/ # Print the third entry from the second AcceptEnv line augtool print '/files/etc/ssh/sshd_config/AcceptEnv[2]/3' # Find the entry in inittab with action 'initdefault' augtool> match /files/etc/inittab/*/action initdefault # Print the last alias for each entry in /etc/hosts augtool> print /files/etc/hosts/*/alias[last()]
FILES
Lenses and schema definitions in /usr/share/augeas/lensesAUTHOR
David Lutterkort <dlutter@redhat.com>
COPYRIGHT AND LICENSE
Copyright 2007, 2008 Red Hat Inc.Augeas (and augtool) are distributed under the GNU Lesser General Public License (LGPL)
SEE ALSO
Augeas project homepage <http://www.augeas.net/>augparse
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre