Above, Below, and Beyond Tech Talk

by Rahel Lüthy

July 25, 2015

Mac OSX Tips & Tricks #8: Finding Files via Terminal

This is how you recursively search all notes.txt files in your home directory (~) for the text snippet foo (from an OSX terminal):

mdfind -name notes.txt -onlyin ~ -0 | xargs -0 grep -i "foo"

It has at least 3 advantages over the traditional find/grep combo:

Happy searching!