tldr/pages/common/ag.md
2016-01-08 09:38:59 +01:00

291 B

ag

The Silver Searcher. Like ack, but faster.

  • Find files containing "foo":

ag foo

  • Find "foo" in files with a name matching "bar":

ag foo -G bar

  • Find files whose contents match a regular expression:

ag '^ba(r|z)$'

  • Find files with a name matching "foo":

ag -g foo