AUGMATCH(1)
π augmatch(1) β the Augeas girlie's field guide
ok so you found the augmatch(1) page in the Augeas manual and you're like "bestie what is this" β don't worry, I got you. Sit down, hydrate, and let's get into it. π«Ά
β¨ NAME β¨
augmatch β inspect and match contents of configuration files. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
augmatch [OPTIONS] FILE
π¦ DESCRIPTION π¦
okay so augmatch prints out the tree that Augeas generates when it parses a configuration file. or β and this is the fun part β it prints just the parts of that tree that match a certain path expression. iykyk. π
the parsing itself is controlled by lenses, and a whole bunch of them ship with Augeas already. augmatch will try to select the correct lens for a given file automatically, unless you specifically hand it one with the --lens option. main character energy: it figures it out on its own, but it will absolutely let you pick. β¨
π OPTIONS π
-a,--allβ print all the tree nodes, even the ones with no associated value. without this flag,augmatchleaves those nodes out of the output because honestly they're usually not that interesting. π-e,--exactβ only print the parts of the tree that exactly match the expression you gave with--match, and none of the descendants of the matching nodes. strictly the matched node, no plus-ones. π-I,--include=DIRβ addDIRto the module loadpath. you can give this multiple times (-Iis a repeater, she's flexible π). the directories you set here get searched before any directories specified in theAUGEAS_LENS_LIBenvironment variable, and before the default directories/usr/share/augeas/lensesand `/usr/share/augeas/lenses/dist.-l,--lens=LENSβ useLENSfor the given file. without this option,augmatchtries to guess the lens for the file based on the file's name and path β which only works for files in standard locations. non-standard path? yeah, you're gonna need this flag. π-L,--print-lensβ print the name of the lens that will be used with the given file, and exit. just the gossip, no tree. π-m,--match=EXPRβ only print the parts of the tree that match the path expressionEXPR. all nodes that matchEXPRand their descendants get printed. use--exactif you want only the matching nodes and not the descendants. π-r,--root=ROOTβ use directoryROOTas the root of the filesystem. this takes precedence over a root set with theAUGEAS_ROOTenvironment variable. root over root, periodt.-S,--nostdincβ do not search any of the default directories for lenses. when this is set, only directories specified explicitly with-Ior specified inAUGEAS_LENS_LIBwill be searched for modules. no defaults, no surprises. π«-o,--only-valueβ print only the value, and not the label or the path of nodes. minimalism slay. π-q,--quietβ do not print anything. exit with zero status if a match was found. silent but useful, the introvert icon. π€«
π§ ENVIRONMENT VARIABLES π§
AUGEAS_ROOTβ the file system root, defaults to/. can be overridden with the-rcommand line option.AUGEAS_LENS_LIBβ colon separated list of directories with lenses. directories specified here are searched after any directories set with the-Icommand line option, but before the default directories/usr/share/augeas/lensesand `/usr/share/augeas/lenses/dist.
order matters here bestie, lowkey the whole search order is:-Idirs βAUGEAS_LENS_LIBdirs β the defaults. don't forget it. π«Ά
β 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
look at that third one β -eom, three flags stacked like a little charm bracelet. ate. π₯
π EXIT STATUS π
- the exit status is
0when there was at least one match π 1if there was no match π2if an error occurred π
π FILES π
lenses and schema definitions live in /usr/share/augeas/lenses and `/usr/share/augeas/lenses/dist
π AUTHOR π
David Lutterkort <lutter@watzmann.net> β the icon who made this all happen. π
π COPYRIGHT AND LICENSE π
Copyright 2007-2018 David Lutterkort
Augeas (and augmatch) are distributed under the GNU Lesser General Public License (LGPL).
π SEE ALSO π
- Augeas project homepage
<http://www.augeas.net/> - Augeas path expressions
<https://github.com/hercules-team/augeas/wiki/Path-expressions> augprint
okay that's the whole page, you're basically an Augeas expert now, no cap. go match some trees. πΈ
Augeas 1.15.0 Β· 2026-09-29 β mwah, that's the version and the date, and that's the whole AUGMATCH(1) page. bye bestie! π
β¨
π¦ where this page comes from
- arch rolling: augeas 1.15.0-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms