App-Relate
view release on metacpan or search on metacpan
You can just type:
relate this with_this and_this -but_not_this
So essentially this script is the equivalent of
locate primary_term | egrep term2 | egrep term3 [....| termN]
Though it also has a few other features, B<relate>:
o screens out "uninteresting" files by default (emacs backups, CVS/RCS files)
o has options to restrict reports to files, directories or symlinks.
An important performance hint: you can speed up relate
tremendously by using a relatively unique first term. For
example, if you're on a unix box, you don't want to start
with something like "home" or "lib" which is going to match
a huge number of files in the locate database. You'll find
that "relate gdk lib" is faster than "relate lib gdk".
The first term should be a simple string (unless you've used the
This script has the extremely useful feature of automatically
omitting uninteresting files, but it's guaranteed that you'll
be confused by this some day, so don't say I didn't warn you.
Remember that there's a "-a" option (also called "--all")
which overrides the default filter and returns all matches.
As of this writing, by default files are ignored that match
these patterns:
'~$' # emacs backups
'/\#' # emacs autosaves
',v$' # cvs/rcs repository files
'/CVS$'
'/CVS/'
'/RCS$'
'\.elc$' # compiled elisp
The default filter can be changed by editing the ~/.relate file.
(This is created the first time you run B<relate>. It is perl code
generated by Data::Dumper, which is evaled when you run relate
( run in 1.411 second using v1.01-cache-2.11-cpan-49f99fa48dc )