5

Suppose I want to find all *tex files recursively from a given directory containing foo and bar but not doe. I am looking for something like helm-do-ag, but that doesn't seem to support the not operator. So is there anything like that which supports search queries with full boolean operations, i.e. something like: "find all tex files containing (apple AND orange) OR (banana and pear) not apricot".

student
  • 1,007
  • 9
  • 29

1 Answers1

5

Try using the UNIX or GNU/Linux find command. It supports Boolean operations.

In Emacs you can, for example, use command find-dired, which runs find and puts the set of found files in a Dired buffer. You can then mark any number of them and then act on the marked files (e.g. A to search incrementally, Q to query-replace). (Emacs also has a grep-find command, at least for some platforms.)

find can search to any depth. It is an amazing command - practically a language unto itself.

Drew
  • 75,699
  • 9
  • 109
  • 225