MacOS – How to sort Spotlight results by size in the Finder

file searchmacossorting

How do I sort search result by size in Finder? I would prefer some sort of setting, or shell plug-in. I'm using this to clean my hard drive by finding and deleting the largest files first.

I'm not going to go into the terminal every time I want to do this.

Best Answer

  • Actually, it is possible to do this, with a little trickery. You need to edit the Finder's preference file to turn on the options that the View Options panel's disabled buttons equate to.

    alt text

    To accomplish this, you need to edit the com.apple.finder.plist preferences file which should be located in the following folder:

    /Users/~/Library/Preferences/

    I use Property List Editor.app, which is part of the Xcode developer tools. There are also third-party applications that can do this, though I can't recommend any off the top of my head.

    The image below shows the key paths for the search view settings. By default, the SearchViewSettings > ListViewSettings > columns > size > visible flag is turned off. Check the box, then save your changes. Preferably, you should edit this preference file while the Finder has been quit, but enabling that behavior is a bit more involved. It should be sufficient to save the preference file and then Control-Option-click on the Finder's icon in the Dock and choose Relaunch.

    alt text

    Also note that by default, Spotlight doesn't search for "System files" or invisible items. System items means items that are located in any of the /Library folders. To allow searching for these items, choose Other… in the popup menu of parameters to search for, then add "System files" and "File visibility".

  • Related Question