The find-grep-dired Command

Just a quick tip from Ruslan Bekenev: find-grep-dired. It’s a nice way of running grep directly from a Dired buffer. The nice thing, as Bekenev points out is that the result is a filtered Dired listing of all the files that contain the specified regular expression. That means that you can do any of the standard Dired operations on them.

The command is really easy to use. The starting directory is already filled in for you, although you can edit it if desired. Then you just specify the regular expression and Emacs takes care of the rest.

You should contrast this with the Dired dired-do-find-regexp command (A) that searches only the marked files and produces a standard grep output. The commands are different but both can be useful. They’re just another set of tools in your Emacs arsenal.

This entry was posted in General and tagged . Bookmark the permalink.