tldr/pages/common/ack.md

25 lines
433 B
Markdown
Raw Normal View History

2014-10-01 23:02:25 +01:00
# ack
> A search tool like grep, optimized for programmers.
2019-04-10 15:10:33 +01:00
> Homepage: <https://beyondgrep.com/documentation/>.
2014-10-01 23:02:25 +01:00
- Find files containing "foo":
2014-10-01 23:02:25 +01:00
`ack {{foo}}`
- Find files of a specific type:
2014-10-01 23:02:25 +01:00
`ack --ruby {{foo}}`
2014-10-01 23:02:25 +01:00
- Count the total number of matches for the term "foo":
2014-10-01 23:02:25 +01:00
`ack -ch {{foo}}`
- Show the file names containing "foo" and number of matches in each file:
2014-10-01 23:02:25 +01:00
`ack -cl {{foo}}`
- List all valid types:
`ack --help=types`