Usage: ack [OPTION]... PATTERN [FILES] Search for PATTERN in each source file in the tree from cwd on down. If [FILES] is specified, then only those files/directories are checked. ack may also search STDIN, but only if no FILES are specified, or if one of FILES is "-". Default switches may be specified in ACK_OPTIONS environment variable. Example: ack -i select Searching: -i, --ignore-case Ignore case distinctions -v, --invert-match Invert match: select non-matching lines -w, --word-regexp Force PATTERN to match only whole words -Q, --literal Quote all metacharacters; expr is literal Search output: --line=NUM Only print line(s) NUM of each file -l, --files-with-matches Only print filenames containing matches -L, --files-without-match Only print filenames with no match -o Show only the part of a line matching PATTERN (turns off text highlighting) --passthru Print all lines, whether matching or not --output=expr Output the evaluation of expr for each line (turns off text highlighting) -m, --max-count=NUM Stop searching in each file after NUM matches -1 Stop searching after one match of any kind -H, --with-filename Print the filename for each match -h, --no-filename Suppress the prefixing filename on output -c, --count Show number of lines matching per file --group Group matches by file name. (default: on when used interactively) --nogroup One result per line, including filename, like grep (default: on when the output is redirected) --[no]color Highlight the matching text (default: on unless output is redirected, or on Windows) -A NUM, --after-context=NUM Print NUM lines of trailing context after matching lines. -B NUM, --before-context=NUM Print NUM lines of leading context before matching lines. -C [NUM], --context[=NUM] Print NUM lines (default 2) of output context. File finding: -f Only print the files found, without searching. The PATTERN must not be specified. -g=REGEX Same as -f, but only print files matching REGEX. --sort-files Sort the found files lexically. File inclusion/exclusion: -a, --all-types All file types searched; directories still skipped -u, --unrestricted All files and directories searched -n No descending into subdirectories --perl Include only Perl files. --type=perl Include only Perl files. --noperl Exclude Perl files. --type=noperl Exclude Perl files. See "ack --help type" for supported filetypes. --[no]follow Follow symlinks. Default is off. Directories ignored by default: autom4te.cache, blib, .bzr, .cdv, cover_db, CVS, _darcs, ~.dep, ~.dot, .git, .hg, ~.nib, .pc, ~.plst, RCS, SCCS, _sgbak and .svn Files not checked for type: /~$/ - Unix backup files /#.+#$/ - Emacs swap files /[._].*\.swp$/ - Vi(m) swap files /core\.\d+$/ - core dumps Miscellaneous: --help This help --man Man page --version Display version & copyright --thpppt Bill the Cat