Find files containing "foo" in a specific directory

ag

  • The Silver Searcher. Like ack, but aims to be faster.
    More information: <https://github.com/ggreer/the_silver_searcher>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

ag {{foo}} {{path/to/directory}}

click the source code to copy install ag on any operating system with command-not-found.com