Does mdfind allow wildcard searches on filename? I'm trying to figure out how to perform wildcard searches for filenames with mdfind on OsX? I tried: mdfind -name "*.pdf" but it didn't work.

EDIT: I want to be able to find names like "test*.pdf"
This should work:

mdfind "kMDItemDisplayName == test*.pdf"


Enclose the pattern in single quotes and add 'c' to match case-insensitively:

mdfind "kMDItemDisplayName == 'test*.pdf'c"


Here is a list of available attributes. You can combine multiple attribute/value pairs with &amp;&amp;.