How do I do advanced searches in Mac OS X?

1

I don't get it. I just want to do simple searches that work. When I type part of a filename, I want to see all the files that have that part of the filename. I know how to do this in terminal, but it takes time to open and then to track down the file once it finds it. Is there a way to do this from the Finder? I want to be able to do **.doc* and get all my docs, or hello*.txt and find all filenames of that form. Am I missing something obvious?

Bonus points if you can tell me how to do boolean searches from the Finder (filename:hello*.txt AND modified:4days) or something.

OSX Snow Leopard.

Thanks!

Philip

Posted 2011-01-13T20:41:18.583

Reputation: 1 103

1You can search for both hello and .txt to be part of the filename by selecting File Name and entering e.g. hello .txt (separated by space). Not the real thing, but useful anyway. – Daniel Beck – 2011-01-13T21:33:36.343

A couple of things that make integration with the terminal easier: Cdto ( http://code.google.com/p/cdto/ ) an application that opens a terminal window in the same directory as the front Finder window, and the "open" command which opens a file or folder from the command line as if you'd double clicked it in Finder.

– stib – 2011-01-28T06:24:25.250

Answers

2

I've found this article to be very helpful. Examples:

  • this OR that - returns matches to anything that contains this or that
  • this AND that - returns matches to anything containing this and that
  • this kind:word - returns matches to this that are Word documents (.docx or .doc)
  • name:this kind:word modified:<21/11/10***** - returns files named this that are Word documents that were modified before 21 November 2010.
  • this NOT that name:test kind:pages created:1/1/11-13/1/11***** - returns pages files named this that don't contain that created between 1 January 2011 and 13 January 2011.

*May be different based on your locale settings; I'm using Canadian English where it's dd/mm/yy, yours may differ.

Hope that helps!

squircle

Posted 2011-01-13T20:41:18.583

Reputation: 6 365

Sorry for the delay. I tried this and for a while this wasn't actually finding the files it purported to, but it turns out that a near-root folder was for some reason in my exclude from spotlight list even though I don't recall putting it there. Now as best as I can tell, this seems to work well, except it still leaves out system files. Do you know of a way, without going into the whole click the plus, drop-down menu, etc. etc. business, to default force include system files? – Philip – 2011-01-15T17:12:05.517

@Philip I don't believe there is a way to set it to include system files by default, unfortunately. Glad I could help! – squircle – 2011-01-15T17:20:51.853

Great answer! I've been missing the advanced search since it disappeared in system 9 or whenever it was. – stib – 2011-01-28T06:27:17.977

1

Check out EasyFind, free from NCH Software. It searches everything, does Boolean searches, you can select where it searches, etc., etc. And it's fast. A go-to that I keep handy for when Spotlight just won't do.

Jay

Posted 2011-01-13T20:41:18.583

Reputation: 11