[ack] Read the list of files to search from standard input

Created on November 30, 2026

By default, ack looks for files under the current directory. Use -x to read a list of paths from standard input. This example searches for hoge in files listed directly in the current directory, excluding directories.

ls -1p | grep -v / | ack -x hoge
ack Shell command