Forrest logo
tool overview
On this page you find all important commands for the CLI tool ack. If the command you are looking for is missing please ask our AI.

ack

Ack is designed as a replacement for 99% of the uses of grep.

Ack searches the named input FILEs (or standard input if no files are named, or the file name - is given) for lines containing a match to the given PATTERN . By default, ack prints the matching lines.

Ack can also list files that would be searched, without actually searching them, to let you take advantage of ack's file-type filtering capabilities.

List of commands for ack:

  • ack:tldr:01f58 ack: Search for a case-insensitive pattern.
    $ ack --ignore-case "${search_pattern}"
    try on your machine
    explain this command
  • ack:tldr:54cce ack: Limit search to files of a specific type.
    $ ack --type=${ruby} "${search_pattern}"
    try on your machine
    explain this command
  • ack:tldr:5bc07 ack: Count the total number of matches found.
    $ ack --count --no-filename "${search_pattern}"
    try on your machine
    explain this command
  • ack:tldr:67d38 ack: Search for lines matching a pattern, printing [o]nly the matched text and not the rest of the line.
    $ ack -o "${search_pattern}"
    try on your machine
    explain this command
  • ack:tldr:8b700 ack: Search for files containing a string or regular expression in the current directory recursively.
    $ ack "${search_pattern}"
    try on your machine
    explain this command
  • ack:tldr:b371b ack: List all the values that can be used with `--type`.
    $ ack --help-types
    try on your machine
    explain this command
  • ack:tldr:d1d77 ack: Print the file names and the number of matches for each file only.
    $ ack --count --files-with-matches "${search_pattern}"
    try on your machine
    explain this command
  • ack:tldr:f07e0 ack: Do not search in files of a specific type.
    $ ack --type=no${ruby} "${search_pattern}"
    try on your machine
    explain this command
tool overview