Search contents of files within specified directory
From the Finder

An easy way is to open a Finder Window to the folder of interest, and use the search box in the upper right corner. For this to work effectively, Finder Preferences should be adjusted as follows:

Under Finder/Preferences/Advanced tab, change 

When performing a search: to

"Search the Current Folder"

From the Command Line

Use mdfind, with the -onlyin option, as below, which will search the current directory for all files with a .jpg suffix:

mdfind -name .jpg -onlyin .