tldr/pages/common/ack.md

20 lines
352 B
Markdown
Raw Normal View History

2014-10-02 02:02:25 +04:00
# ack
> A search tool like grep, optimized for programmers.
- Find files containing "foo":
2014-10-02 02:02:25 +04:00
`ack {{foo}}`
- Find files in a specific language:
2014-10-02 02:02:25 +04:00
`ack --ruby {{each_with_object}}`
- Count the total number of matches for the term "foo":
2014-10-02 02:02:25 +04:00
`ack -ch {{foo}}`
- Show the file names containing "foo" and number of matches in each file:
2014-10-02 02:02:25 +04:00
`ack -cl {{foo}}`