How to find files in the Finder

I think I'm doing something wrong with my use of the Finder, but I can't tell what.

I was trying to find a .jar file, and I realize I don't know whether the Finder can't find it or it doesn't exist. So I started looking for folders and files that I know exist, to confirm or deny that the Finder is getting the right commands from me.

There is a folder at ~/.m2/, and when I look for it in the Finder, it can't find it. I also searched for a file within the ~/.m2/ directory, and it couldn't find that.

This is where I'm confused. Sometimes, the Finder returns results quickly, and other times, I'm not really sure if anything is happening or not. Right now, it says 'Searching 'All My Files'" as the title of the Finder window. Does that mean the search is still in progress? Or is that just a title? I'm not sure.

It also doesn't say, "Search done, found X results" or "Search in progress", or anything. There's no pinwheel, no information. I have no idea whether it's still preforming a search or not.

What am I doing wrong? How do I use the Finder to find my files?

The hardware I'm using is Macbook Pro, OS version 10.12.4.


Solution 1:

~/.m2/ has a dot as the first character of the directory name. This is a hidden folder, so isn't indexed by Spotlight. Finder won't find this because it's not in Spotlight's index. Rename the folder without the dot for the folder to be indexed.

Searching with Finder uses Spotlight so should be near-instantaneous. You can show the status bar with View → Show Status Bar (⌘/) and a pinwheel will appear at the right of the bar when Finder is still searching, disappearing after the search is complete.

Solution 2:

Finder can't find

The "Finder" is actually pretty terrible at finding things from a UX perspective. I'm not fond of Spotlight either (replace that with Quicksilver or Alfred). Neither one wants to help you find hidden directories and files (the ones with a . at the beginning of their name). Those are the most fun ones!

Terminal is your friend

Having used OSX since the very beginning (I know we're not supposed to call it "X" anymore), I've come to the conclusion that it's better to just learn how to use Terminal.app. It is especially excellent at finding anything and everything exactly as you instruct it.

In your case, you want to find all files. Not all as Finder.app defines it, but really all files. In Terminal, you just add the -a option to show all. Add -type d to only find directories. To search for part of the name, include * as a "wildcard" character. All of that together looks something like this:

find Directory/SubDirectory -a -type d -name *m2

For more on the power of find, type man find into the Terminal and hit enter, or just read this great article. And never bother with trying to find things in Finder.app again.

Solution 3:

I used a Mac app 'easy-find' just last night for same problem. I was looking for my .bash_profile file using the finder. easy-find found it for me. It is a free app.