2

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.

4

~/.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.

  • How do I literally search "all my files", including the hidden ones? The reason I ask is because I'm actually looking for other files, and using .m2 as a "proof of concept" of how to use the finder. The problem is I have no idea where my other files are, and thus I can't rename the folder they're in if it's a hidden folder. – r12 Jun 2 '17 at 18:24
  • 4
    @r12 You'll need to use an app like FindAnyFile, iFileX or use find from Terminal. – grg Jun 2 '17 at 18:27
  • 1
    As a heads-up to anyone that might come across this answer in a different context--renaming ~/.m2 is not typically a good idea, and requires reconfiguring Maven for a different local repository path. – hexafraction Jun 3 '17 at 4:58
  • @hexafraction mv ~/.m2 ~/m2 && ln -s ~/m2 ~/.m2 doesn't require any further configuration for anything which uses the folder. – grg Jun 3 '17 at 6:51
3

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.

  • 2
    There's also locate/mlocate, although IIRC it's not set up by default; when it is, it's much faster than find, since it uses a precompiled database (like Spotlight, but better!). – Xiong Chiamiov Jun 3 '17 at 2:13
1

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.

You must log in to answer this question.

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