Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Finder when I type something in the textbox the default is to search the whole mac in the contents of the files. I was able to change the default to search the current directory, but didn't see an option to change search for contents to search for file name. How can that be changed?

share|improve this question

6 Answers 6

On 10.6 you can either add <key>SearchNameOnly</key><true/> to the SearchCriteria dictionary in /System/Library/CoreServices/Finder.app/Contents/Resources/default_smart.plist or replace default_smart.plist with a normal saved search file. (And reopen Finder.) Neither option seems to work on Lion though.

You can also press ⌃⌘F (or ⇧⌘F on 10.6) to open a Spotlight window that is set to search by name by default.

share|improve this answer
2  
Alternatively, enter sudo /usr/libexec/PlistBuddy -c "Add :SearchCriteria:SearchNameOnly bool true" /System/Library/CoreServices/Finder.app/Contents/Resources/default_smart.plist in Terminal. sudo /usr/libexec/PlistBuddy -c "Delete :SearchCriteria:SearchNameOnly" /System/Library/CoreServices/Finder.app/Contents/Resources/default_smart.plist to undo. –  Daniel Beck May 12 '11 at 5:26

One more bit here that I don't see on the the page. After doing this you'll need to Relaunch the Finder. 1 Push option-command-escape, 2 select Finder, 3 click Relaunch. 4 Close the window using the little red x in the top left.

share|improve this answer
    
I edited my answer to add that. You can also secondary-click Finder's Dock icon while holding option and select Relaunch. –  Lri Nov 27 '12 at 13:28

The above worked, and I thought I'd spell out the steps.

After locating the Finder Application (System/Library/CoreServices/Finder.app), Change the Finder app with Get Info to allow read/write by your user admin account. New Control-click the Finder and Show Package Contents. Look for the default_smart.plist file here: System/Library/CoreServices/Finder.app/Contents/Resources/default_smart.plist

Copy the file default_smart.plist out to desktop (save an original elsewhere as well just in case), edit in TextEdit, and insert the line <key>SearchNameOnly</key><true/> before the end of that dict grouping here:

    <key>SearchNameOnly</key><true/>
</dict>
<key>Version</key>

Then save and replace the file default_smart.plist in it's location: System/Library/CoreServices/Finder.app/Contents/Resources/default_smart.plist (you will need to authenticate with a password to save changes to the Finder)

share|improve this answer

For anyone new Googling over to this tip, in Snow Leopard, the last tip worked, the first ones did not. I followed every step twice.

Mine works perfect. Here it us for those who don't want to guess....

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CompatibleVersion</key>
    <integer>1</integer>
    <key>RawQuery</key>
    <string>((_kMDItemGroupId &gt; 6))</string>
    <key>SearchCriteria</key>
    <dict>
        <key>CurrentFolderPath</key>
        <string>/</string>
        <key>FXCriteriaSlices</key>
        <array>
            <dict>
                <key>SearchNameOnly</key>
                <array>
                    <string>kMDItemKind</string>
                    <integer>300</integer>
                    <integer>400</integer>
                </array>
                <key>displayValues</key>
                <array>
                    <string>Kind</string>
                    <string>is</string>
                    <string>any</string>
                </array>
                <key>rowType</key>
                <integer>0</integer>
                <key>subrows</key>
                <array/>
            </dict>
        </array>
        <key>FXScope</key>
        <integer>0</integer>
        <key>FXScopeArrayOfPaths</key>
        <array>
            <string>kMDQueryScopeComputer</string>
        </array>
    <key>SearchNameOnly</key><true/>
    </dict>
    <key>Version</key>
    <string>10.4</string>
</dict>
</plist>
share|improve this answer
    
I apologize if anyone can't read the code I pasted into the comment I made. It appears there is a character limitation on this site. if you match this segment of code, it works: <key>FXCriteriaSlices</key> <array> <dict> <key>SearchNameOnly</key> <array> Good luck... After years of wanting this, I finally thought to look for and find a solution. Thanks to the users who posted above me. Chuck –  Chuck May 2 '11 at 19:59

For those of you with recent OS 10X, simply open FInder, click on File in the top bar, go down to select "find" and then select "name" and matches in the two boxes left of the search window.

share|improve this answer
    
Thanks, that's useful. I wish there were an easy way to make that the default. –  Andrew Swift Aug 1 at 16:30

Another way to set the finder to default "find by name" (validated on Mac OS X 10.8.5 Mountain Lion):

Here's a step by step:

  1. Open System Preferences
  2. Click on "Keyboard"
  3. Click on "Keyboard Shortcuts"
  4. Click on "Application Shortcuts" (on my system this was the last item located on the left-hand side window)
  5. Click the little "+" right below the right-hand side window
  6. Click on the "Application" menu and choose "finder.app"
  7. Click into the field "Menu Title:" and type "Find by Name..." (Type it exactly like that including the three dots. Don't type the quotes.)
  8. Click into the field "Keyboard Shortcut:" and press the command-key and F at the same time. It should look like this ⌘F
  9. Close System Preferences

That's it. Basically what you are doing is remapping the command-F key (⌘F) to "Find By Name".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.