AUGMATCH(1) Augeas AUGMATCH(1)

# [NAME](#NAME)

augmatch - inspect and match contents of configuration files

# [SYNOPSIS](#SYNOPSIS)

augmatch \[OPTIONS] FILE

# [DESCRIPTION](#DESCRIPTION)

**augmatch** prints the tree that Augeas generates by parsing a configuration file, or only those parts of the tree that match a certain path expression. Parsing is controlled by lenses, many of which ship with Augeas. **augmatch** to select the correct lens for a given file automatically unless one is specified with the **--lens** option.

# [OPTIONS](#OPTIONS)

[**-a**, **--all**](#a)

Print all tree nodes, even ones without an associated value. Without this flag, augmatch omits these nodes from the output as they are usually uninteresting.

[**-e**, **--exact**](#e)

Only print the parts of the tree that exactly match the expression provided with **--match** and not any of the descendants of matching nodes.

[**-I**, **--include**=*DIR*](#I)

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 directories */usr/share/augeas/lenses* and */usr/share/augeas/lenses/dist*.

[**-l**, **--lens**=*LENS*](#l)

Use LENS for the given file; without this option, **augmatch** tries to guess the lens for the file based on the file's name and path which only works for files in standard locations.

[**-L**, **--print-lens**](#L)

Print the name of the lens that will be used with the given file and exit.

[**-m**, **--match**=*EXPR*](#m)

Only print the parts of the tree that match the path expression EXPR. All nodes that match EXPR and their descendants will be printed. Use --exact to print only matching nodes but no descendants.

[**-r**, **--root**=*ROOT*](#r)

Use directory ROOT as the root of the filesystem. Takes precedence over a root set with the AUGEAS\_ROOT environment variable.

[**-S**, **--nostdinc**](#S)

Do not search any of the default directories for lenses. When this option is set, only directories specified explicitly with **-I** or specified in **AUGEAS\_LENS\_LIB** will be searched for modules.

[**-o**, **--only-value**](#o)

Print only the value and not the label or the path of nodes.

[**-q**, **--quiet**](#q)

Do not print anything. Exit with zero status if a match was found

# [ENVIRONMENT VARIABLES](#ENVIRONMENT_VARIABLES)

[**AUGEAS\_ROOT**](#AUGEAS_ROOT)

The file system root, defaults to '/'. Can be overridden with the **-r** command line option

[**AUGEAS\_LENS\_LIB**](#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 directories */usr/share/augeas/lenses* and */usr/share/augeas/lenses/dist*

# [EXAMPLES](#EXAMPLES)

```
  # print the tree for /etc/exports
  augmatch /etc/exports
  # show only the entry for a specific mount
  augmatch -m 'dir["/home"]' /etc/exports
  # show all the clients to which we are exporting /home
  augmatch -eom 'dir["/home"]/client' /etc/exports
```

# [EXIT STATUS](#EXIT_STATUS)

The exit status is 0 when there was at least one match, 1 if there was no match, and 2 if an error occurred.

# [FILES](#FILES)

Lenses and schema definitions in */usr/share/augeas/lenses* and */usr/share/augeas/lenses/dist*

# [AUTHOR](#AUTHOR)

David Lutterkort &lt;lutter@watzmann.net&gt;

# [COPYRIGHT AND LICENSE](#COPYRIGHT_AND_LICENSE)

Copyright 2007-2018 David Lutterkort

Augeas (and augmatch) are distributed under the GNU Lesser General Public License (LGPL)

# [SEE ALSO](#SEE_ALSO)

**Augeas** project homepage &lt;http://www.augeas.net/&gt;

**Augeas** path expressions &lt;https://github.com/hercules-team/augeas/wiki/Path-expressions&gt;

augprint

2026-10-25 Augeas 1.15.0

---

Document: augmatch(1) from augeas 1.15.0-r1 (Chainguard OS)
Source: https://github.com/hercules-team/augeas.git
