Recursive grep
Last modified on July 24, 2026 • 1 min read • 97 wordsgrep (case-insensitive, recursive) grep doesn’t offer any possibility to recursively descent down the directory tree.
grep bacteria *To make the search case-insensitive, one can use the i flag:grep -i bacteria *But if you want to do a recursive search you have to use a quite complicated construction of UNIX commands to achieve this goal:find ~/Mail -type f -exec grep 'bacteria' {} \; -printThis command searches recursively thru the Mail directory of the current user and prints all the lines that contain the word bacteria.