Can -onlyin contain wildcards?

mdfind pattern -onlyin '*bin'

I know this works:

mdfind pattern | grep bin

No, mdfind's -onlyin does not perform pathname expansion nor tilde expansion and only accepts explicit pathnames. You can have multiple -onlyin options.

  • stackexchange ls in context of shell expanstion unix.stackexchange.com/questions/62660/… the * is actually the shell (zsh or bash) expanding. So splat (*) is preformed by the shell, then what ever is expanded by the shell is passed to mdfind – wrothe Jul 18 '18 at 6:10
  • @wrothe- not when the * is quoted – fd0 Jul 18 '18 at 8:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .