Skip to content

Instantly share code, notes, and snippets.

Created August 27, 2015 15:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
<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>
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment