mdfind -name stdlib.h
and then you pipe the result as you want
mdfind Ruby | grep 'pdf'
You can redefine your search by specifying any of the metadata attribute keys.
Here is a helpful list of metadata attributes that you can use.
You'd like to see what changed in your home directory today, easy.
mdfind -onlyin ~/ '(kMDItemFSContentChangeDate >= $time.today)'