Skip to content

Instantly share code, notes, and snippets.

@jvehent
Created August 27, 2015 15:53
Show Gist options
  • Save jvehent/7bbe1ed21b4d75e9393d to your computer and use it in GitHub Desktop.
Save jvehent/7bbe1ed21b4d75e9393d to your computer and use it in GitHub Desktop.
<div class="section" id="search-options">
<h2><a class="toc-backref" href="#id4">1.3&nbsp;&nbsp;&nbsp;Search Options</a></h2>
<p>Several options can be applied to a search:</p>
<ul>
<li><p class="first"><strong>macroal</strong> stands for &quot;Match All Contents Regexes On All Lines&quot;. It's a boolean
option that requires that all <cite>content</cite> regexes must match on all the lines of
a file. By default, content regexes are applied at the file level and will
return a match if one line matches one regex, and if another line matches another
regex. When the <cite>macroal</cite> option is set, each line in the file must match all
content regexes defined in a given search to return a match. It is set to not
set by default.</p>
<p>example: <cite>-path /home -name authorized_keys -content &quot;!^(#|s+|...list of ssh keys...)$&quot; -macroal</cite></p>
<p>will list authorized_keys file that have a line that isn't either a comment,
an empty line or a known key. This example can be used to detect SSH keys that
are not part of a trusted set.</p>
</li>
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment