News for hackers. Stuff that matters.
Re:macOS Ventura is now available by zestyping on Monday October 24, 2022 @03:02PM (#33320882)
Countless person-years of engineering effort, and Spotlight is still mostly useless.

All I want is to hit Command-F to quickly search the filenames in the current folder (not start a sluggish scan of my entire hard disk). There used to be workarounds for this, but then they removed "Find by Name..." from Finder just to make our lives harder. Does anyone know a workable alternative?

Re:macOS Ventura is now available by chongli on Monday October 24, 2022 @03:04PM (#33320938)
Finder -> Preferences -> Advanced.

When performing a search:

Search the current folder

Re:macOS Ventura is now available by kennend3 on Monday October 24, 2022 @03:31PM (#33321340)
Thanks!! Having it search my mac by default was a mild annoyance (you can click search current folder once the search starts). But this is helpful
Re:macOS Ventura is now available by orpheansodality on Monday October 24, 2022 @03:25PM (#33321247)
wow - how is this not the default? It's always the behavior that I expect to happen, and I'm pretty much always surprised and disappointed when it does a global search instead.
Re:macOS Ventura is now available by zinckiwi on Monday October 24, 2022 @03:34PM (#33321397)
Especially when global search is only ever a Cmd-Space away.
Re:macOS Ventura is now available by anigbrowl on Monday October 24, 2022 @03:51PM (#33321656)
Windows also defaults to full text file searches instead of filenames, which is super annoying when you thousands upon thousands of documents. It's often faster to open a terminal window, type 'dir search string and open the file from the terminal.
Re:macOS Ventura is now available by smw on Monday October 24, 2022 @04:00PM (#33321786)
Try everything search [0], I don't think I could use windows without it. Just search filenames, instant, whole disk.

[0] https://www.voidtools.com/support/everything/

Re:macOS Ventura is now available by zeppelin101 on Tuesday October 25, 2022 @01:47AM (#33326700)
Seconded. This is a killer app. I can't imagine using Windows without it.
Re:macOS Ventura is now available by hwbehrens on Monday October 24, 2022 @04:13PM (#33321978)
> how is this not the default?

This is just speculation, but based on a conversation with my partner, there are two types of computer users. The first group makes use of hierarchical storage, consistent naming conventions, and other organizational tricks to give them a rough idea of where any file might be. The second group has never heard the term "file systems" and just stores everything with an arbitrary name in whatever location the originating application uses by default.

The first group would prefer to search the given directory, because the supplied context (of which folder to start the search in) drastically improves/speeds search results. The second group prefers to search the entire disk, because supplying that additional context is impossible - any file might appear anywhere.

The set intersection between the first group and "people who change their default settings" is much higher than it is with the second group. Consequently, the whole disk search is enabled by default.

Additionally, given the addition of an "All My Files" view in Finder (a feature which the first group would probably find baffling), Apple may also believe that the latter group outnumbers the former.

Re:macOS Ventura is now available by mc10 on Monday October 24, 2022 @04:42PM (#33322430)
Reminds me of this Verge article reporting that kids growing up with iPhones don’t know what files or directories are: https://www.theverge.com/22684730/students-file-folder-direc...
Re:macOS Ventura is now available by fossuser on Monday October 24, 2022 @05:29PM (#33322895)
Yeah this is true, friends that are professors say they now have to have a basic class early in the semester that explains folders, files, and other basics to students.
Re:macOS Ventura is now available by hyperjeff on Tuesday October 25, 2022 @12:27AM (#33326240)
Very much an intentional goal of the OS when it came out, the hope being that the concepts of files and folders might never be needed. A bold move to get rid of a mental overhead for using a computer that was never natural or intuitive to non-tech users. They eventually had to back off a bit, but it’s an amazing accomplishment that most users can still use these devices as if files weren’t a thing.
Re:macOS Ventura is now available by phist_mcgee on Tuesday October 25, 2022 @08:20AM (#33329517)
How long do you think that IT professionals will need to care about hierarchical file systems?
Re:macOS Ventura is now available by drstewart on Monday October 24, 2022 @04:38PM (#33322391)
Funny, I'm in the first group but I'd much rather have it search everything by default: because I organize my files, if I'm searching for one that means that I don't know where it is, so I need to look everywhere.
Re:macOS Ventura is now available by rubyist5eva on Monday October 24, 2022 @05:45PM (#33323063)
Funny enough, I'm in the first group but prefer Finder's default behavior for the second group.
Re:macOS Ventura is now available by stouset on Monday October 24, 2022 @06:01PM (#33323214)
To me this is definitely it. Using non-technical people's computers is eye-opening. Thousands of files scattered around on the Desktop, Documents, or wherever they just happened to go. Finding something in a specific directory would be a completely foreign concept.
Re:macOS Ventura is now available by d12bb on Tuesday October 25, 2022 @04:58AM (#33327997)
Well, count me in the third group: I make use of hierarchical storage, consistent naming conventions, and other organizational tricks to give me a rough idea of where any file might be. I also fail miserably at it (apart from dev/programming stuff, which all is in `~/dev/<project name>`) and rely heavily on search to find anything again.

As search is fast enough nowadays with indexing, I'd rather have it search the whole disk every time than the directory I'm in just to realize I've put it someplace else.

Re:macOS Ventura is now available by Nextgrid on Monday October 24, 2022 @06:22PM (#33323427)
The other comments make a good point about it being optimized for dumbasses that don't even understand the basic concepts of file management.

Maybe we need a name for this behavior, I propose "idiot-driven-development".

Re:macOS Ventura is now available by seanp2k2 on Monday October 24, 2022 @03:57PM (#33321742)
also `mdfind whatever` if you prefer the CLI
Re:macOS Ventura is now available by fiddlerwoaroof on Monday October 24, 2022 @04:51PM (#33322539)
If you want by name `mdfind -name whatever`.
Re:macOS Ventura is now available by nuker on Monday October 24, 2022 @10:58PM (#33325635)
also fd, brew install fd
Re:macOS Ventura is now available by satysin on Monday October 24, 2022 @03:59PM (#33321765)
If you have a setup script add the following to set this automatically:

    defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
Re:macOS Ventura is now available by shoelessone on Monday October 24, 2022 @05:28PM (#33322878)
I'm interested in what you mean by "setup script" - I assume you have a script of some sort you run when / if you re-install the OS? I'd love to hear more about this!
Re:macOS Ventura is now available by satysin on Monday October 24, 2022 @05:31PM (#33322922)
I have a simple shell script that does a bunch of setup for me to automate things.

It grabs my dot files and restores them, installs Homebrew and a bunch of programs, restores their plists (I have backup script that backs up all their plists) and writes a bunch of macOS settings via the `defaults write` command.

I can install/wipe macOS, follow the initial setting screens then when on the desktop I just connect to my NAS, copy over one script and run it in the Terminal to get my machine setup how I like it. It isn't perfect but it does about 97% of the work for me with the added bonus that it is consistent/reproducible for the most part so avoids me forgetting to change a setting some place.

I don't go crazy with it as I don't wipe my machine often enough to justify going all out with a fully automated system. Honestly it is less to save time and more to maintain consistency and have a 'documented as code' record of my environment setup (not quite infrastructure as code levels :)

Re:macOS Ventura is now available by sjg on Monday October 24, 2022 @05:36PM (#33322980)
Look up dotfiles on GitHub - for example https://github.com/mathiasbynens/dotfiles/blob/main/.macos
Re:macOS Ventura is now available by warvariuc on Tuesday October 25, 2022 @12:31AM (#33326266)
Oh, my!

  # Trackpad: enable tap to click for this user and for the login screen

  # Trackpad: map bottom right corner to right-click

  # Disable “natural” (Lion-style) scrolling
Re:macOS Ventura is now available by gloosx on Tuesday October 25, 2022 @02:46AM (#33327060)
ha-ha imagine dragging things with two fingers PRESSED INTO TRACKPAD instead of beautiful (yet hidden deeply in settings) three-finger drag

this is old-lenovo-hacker style

Re:macOS Ventura is now available by ThePowerOfFuet on Tuesday October 25, 2022 @04:31AM (#33327784)
Tap to click is an abomination. I have no love left for Apple, but their trackpads are orders of magnitude better than anyone else's in the industry.

Have you tried using the trackpad at its default settings? They actually make a ton of sense.

Re:macOS Ventura is now available by unqueued on Tuesday October 25, 2022 @03:13PM (#33334909)
I added a PR to fix rsync, mosh, and some other tools, since they will be broken out of the box.

But it seems this project has fallen behind on PRs.

If you would like to have this fix, you can do this after cloning the repo:

  git clone https://github.com/mathiasbynens/dotfiles && cd dotfiles

  git fetch origin "+refs/pull/*/head:refs/remotes/origin/pr/*" && git cherry-pick origin/pr/963
Re:macOS Ventura is now available by insane_dreamer on Monday October 24, 2022 @04:03PM (#33321832)
Agreed. Its an embarrasment.

Use Alfred; I've been using it for years (10 maybe?) -- solves this problem and is extremely useful in general

Re:macOS Ventura is now available by rcarr on Monday October 24, 2022 @04:12PM (#33321957)
+1 for Alfred. Amazing software.
Re:macOS Ventura is now available by blackSnake on Monday October 24, 2022 @05:29PM (#33322888)
++2 for Alfred. AND it has plugins so you can search your Chrome or Brave tabs with Alfred as well. I just hit CMD + Shift + T and it'll search all my open tabs without the browser being in focus. I had to pay but it wasn't much. Use it everyday! https://github.com/epilande/alfred-browser-tabs
Re:macOS Ventura is now available by insane_dreamer on Monday October 24, 2022 @06:07PM (#33323272)
oooh, I hadn't seen that plugin before; nice
Re:macOS Ventura is now available by ajgrover on Monday October 24, 2022 @05:29PM (#33322894)
I used Alfred for 10+ years as well, but am a recent Raycast convert. Much larger and easier to use extension ecosystem, and looks nicer too IMO.
Re:macOS Ventura is now available by orf on Monday October 24, 2022 @07:42PM (#33324171)
Raycast looks really interesting. Is there anything you miss from Alfred?
Re:macOS Ventura is now available by ajgrover on Monday October 24, 2022 @07:46PM (#33324214)
Nope, I installed a few extensions to replicate things I had in Alfred, and got a few new features for free
Re:macOS Ventura is now available by Maarius on Monday October 24, 2022 @08:49PM (#33324744)
Alfred (https://www.alfredapp.com/) and BetterTouchTool (https://folivora.ai/) really are two of the must-haves for every mac.
Re:macOS Ventura is now available by skohan on Tuesday October 25, 2022 @01:31AM (#33326612)
> BetterTouchTool

Physical function keys are a must-have for every mac imo

Re:macOS Ventura is now available by btgeekboy on Tuesday October 25, 2022 @04:12AM (#33327620)
BTT does work with the TouchBar, but the "Touch" in the name comes from "touchpad" since it originally was used to add various macros/gestures to the touchpad and mouse. TouchBar support was added later.

Most new Macs come with full-size function keys, including a massive escape key the same size as the tab key. (At least on the en-US layout; can't speak to others.)

Re:macOS Ventura is now available by ThePowerOfFuet on Tuesday October 25, 2022 @04:32AM (#33327795)
> > BetterTouchTool

> Physical function keys are a must-have for every mac imo

While it wasn't the case for a while, they all do now.

Re:macOS Ventura is now available by dzhiurgis on Tuesday October 25, 2022 @04:27AM (#33327748)
TipTap mapped to cmd+tab oh lordy
Re:macOS Ventura is now available by ris58h on Tuesday October 25, 2022 @04:42AM (#33327865)
Interesting. What other gestures do you use? I've tried to setup BTT to emulate cmd+tab with swipe right or left but it wasn't a smooth experience so I've made Touch-Tab https://github.com/ris58h/Touch-Tab
Re:macOS Ventura is now available by dzhiurgis on Tuesday October 25, 2022 @06:21AM (#33328564)
Made a mistake, I use TipTap for ctrl+tab aka switching tabs in browsers and IDE's.

Also four finger press for cmd+`

Re:macOS Ventura is now available by 8fingerlouie on Tuesday October 25, 2022 @05:13AM (#33328103)
I have a lifetime/powerpack Alfred license, and i don't use it much, if at all. I have it installed, but in my experience Spotlight has gotten a lot better in recent years, at least to the point where i just use that.

My only excuse for using Alfred is Dash (https://kapeli.com/dash), which integrates with Alfred, but these days so does just about every editor i use (including Vim, Emacs and Sublime Text), so i very rarely find myself using Alfred for it anymore.

One tool i do use at lot though is Hook (https://hookproductivity.com/).

Re:macOS Ventura is now available by Tagbert on Tuesday October 25, 2022 @02:01PM (#33334071)
It’s an easy configuration change to default the search to the current folder. Alfred is great on it’s own but not needed to fix this.
Re:macOS Ventura is now available by ideamotor on Monday October 24, 2022 @04:08PM (#33321902)
Hilarious this is not default. Thanks.
Re:macOS Ventura is now available by LeoPanthera on Monday October 24, 2022 @06:15PM (#33323355)
Well yes but in Ventura "Preferences" is now "Settings".

¯\_(ツ)_/¯

Re:macOS Ventura is now available by behnamoh on Monday October 24, 2022 @09:44PM (#33325143)
Why isn't this the default setting? I mean, who searches their entire machine when they're inside a folder?
Re:macOS Ventura is now available by Tagbert on Tuesday October 25, 2022 @02:06PM (#33334117)
@hwbehrens lays out the likely reason in an earlier post https://news.ycombinator.com/item?id=33321978

Short answer Large number of users don’t use folders to organize their files. They just depend on searching everywhere to find files that may have dropped in any random location. Those people are less likely to find the setting that makes current folder the default search target.

Re:macOS Ventura is now available by zestyping on Thursday October 27, 2022 @05:48AM (#33355356)
That searches the _contents_ of the files in the current folder. I just want to search the names (the way Cmd-F works in, you know, every other application: it searches what you see in the window).
Re:macOS Ventura is now available by lilyball on Monday October 24, 2022 @03:07PM (#33320978)
No they didn't. Find by Name… still exists. It's ⌃⇧⌘F (ctrl-shift-cmd-F). You might have missed it because it's a dynamic menu item (Find turns into Find by Name… once you press ⌃⇧).

Tip: Use the Help menu to search menu items. I just pressed ⌘? and typed "Find" and Find by Name… popped up.

Re:macOS Ventura is now available by sitzkrieg on Monday October 24, 2022 @05:51PM (#33323109)
very intuitive /s
Re:macOS Ventura is now available by lilyball on Monday October 24, 2022 @11:29PM (#33325839)
Dynamic menu items have existed for most of the history of macOS 10+.
Re:macOS Ventura is now available by replygirl on Monday October 24, 2022 @11:39PM (#33325899)
The option[+shift] modifier and searchable menu bar have both been around for about 15 years
Re:macOS Ventura is now available by cromka on Tuesday October 25, 2022 @04:50AM (#33327924)
> I just pressed ⌘? and typed "Find" and Find by Name

Damn, been using macOS for 9 years now and just found out about this :o Thanks!

Re:macOS Ventura is now available by isametry on Tuesday October 25, 2022 @07:57AM (#33329324)
The "Help" menu item is a major lifesaver and especially in complex apps (that is, those which actually take advantage of macOS' native menus, which sadly isn't a given nowadays).

For example Photoshop (and its colleagues) is darn near impossible for me to use on Windows — and at least 50% of the reason is absence of the "Help" menu search feature.

Re:macOS Ventura is now available by zestyping on Thursday October 27, 2022 @05:45AM (#33355337)
Ctrl-Shift-Cmd-F? Are you forking kidding me? I know sometimes you can press Option to show secret menu items (which I bet <10% of Mac users know) but Ctrl and Shift too? So now you have to press 7 different combinations of modifier keys just to discover what menu commands are available. Just wow.

Thank you for showing me that menu command! That'll be a lifesaver going forward. Usability achieved despite Apple design, not because of it.

Re:macOS Ventura is now available by max_hammer on Monday October 24, 2022 @03:29PM (#33321304)
I started using Alfred app recently on my work laptop. It's far superior than `Spotlight`

https://www.alfredapp.com/

Re:macOS Ventura is now available by lelandfe on Monday October 24, 2022 @03:39PM (#33321473)
It should be embarrassing how much faster Alfred's search is. Using Alfred to just search feels like using a Ferrari to pick up groceries, but it really is just better – and has been for as long as I can remember.
Re:macOS Ventura is now available by Hamuko on Monday October 24, 2022 @05:12PM (#33322736)
Doesn't Alfred just use the Spotlight in the backend for searches?
Re:macOS Ventura is now available by lelandfe on Monday October 24, 2022 @05:53PM (#33323129)
It keeps your applications in a small (i.e fast) cache, so it's more or less instant when using it as an app finder.

I think it, yes, uses the Spotlight index for finding files, although I wouldn't be surprised if Alfred does some clever stuff on top of it too.

Re:macOS Ventura is now available by tambourine_man on Monday October 24, 2022 @03:26PM (#33321255)
No workaround needed, just poorly placed settings and toggles:

• Finder -> Preferences -> Advanced -> “When performing a search: Use the Previous Search Scope”

• On any Finder window, CMD-F -> Search: This Mac / [ FolderName ]

• On the loupe: “Filename” instead of “Everything”

Enjoy

Re:macOS Ventura is now available by coldpie on Monday October 24, 2022 @03:04PM (#33320925)
Like in a Finder window? I just start typing a filename and it jumps to the letters I typed. In the column view, you can use tab and shift-tab to switch between columns, allowing quick navigation into a directory tree. I may be misunderstanding you?
Re:macOS Ventura is now available by alin23 on Monday October 24, 2022 @03:09PM (#33321000)
I still wish for something like Everything on Windows (https://www.voidtools.com/)

I wrote my own solution using fd + sqlite + fzf but it's nowhere as fast as Everything, and it also requires me to focus the Terminal to use it.

Re:macOS Ventura is now available by MuffinFlavored on Monday October 24, 2022 @03:11PM (#33321039)
Everything is only fast because of an index, right?

How it catches all file writes to update that index near instantaneously, I have no idea.

Re:macOS Ventura is now available by alin23 on Monday October 24, 2022 @03:19PM (#33321159)
Everything uses NTFS journaling as far as I know.

I actually solved that by using the native macOS fsevents API which can watch the whole filesystem for changes, and I can instantly update the SQLite db I use for the index through that.

The problem is actually enumerating and searching the whole database, that's the slow part. Right now I have over 5 million rows in it and passing the SELECT results to fzf is the slowest part, taking a few seconds at least on an M1 Max.

I'm not sure how Everything presented the results so fast, with metadata and everything.

Re:macOS Ventura is now available by cube2222 on Monday October 24, 2022 @03:42PM (#33321513)
The fsevents part is interesting, didn't know that!

To your point regarding the slowness - in that case it's not really acting as an index though, is it, if you're scanning the whole list and passing it to fzf?

A proper fuzzy text search index (I think elastic and similar engines have these built-in) should yield orders of magnitude better performance.

Re:macOS Ventura is now available by alin23 on Monday October 24, 2022 @03:54PM (#33321692)
Yes, you're right. I did try Meilisearch for this but I wanted close-to-instant Smith-Waterman fuzzy searching which is why I settled on FZF.

In the end I might have to reimplement that in Swift with an always cached index and native Spotlight like search bar to really make this as easy to use as I want.

It's not practical to reach for the browser or Terminal to do this search.

Re:macOS Ventura is now available by jks on Monday October 24, 2022 @03:49PM (#33321626)
Happy user of Finda here: https://keminglabs.com/finda/

Don't know if it works on Ventura, not upgrading until I know.

Re:macOS Ventura is now available by yboris on Monday October 24, 2022 @04:25PM (#33322199)
Thank you for sharing! Neat tool!
Re:macOS Ventura is now available by DavideNL on Tuesday October 25, 2022 @03:48PM (#33335279)
Fyi, it does not work. I get this error when opening Finda on macOS Ventura 13.0 (22A380):

"This version of Finda (629.0.0+df7956) is not compatible with your operating system version (22.1.0). Press Enter to download the latest version or Command+ to quit."

EDIT: e-mailed the Developer, beta release coming tomorrow...

Re:macOS Ventura is now available by dirkg on Monday October 24, 2022 @03:58PM (#33321755)
sometimes I think MSFT should buy Everything and replace Windows search with it. There are some plugins that use it for other file managers.

But then again, they will almost certainly screw it up, given that Windows Search still can't search my start menu reliably without pauses. And their history with acquisitions and integrating tech isn't very good.

Re:macOS Ventura is now available by copperx on Monday October 24, 2022 @05:31PM (#33322918)
Things like that infuriate me and make me want to throw my laptop out of the window. There's no excuse for the start menu search not being instantaneous, but Windows isn't the only offender. Searching for an app on Android is also slow.

With Windows, it is death by a thousand paper cuts. With Linux, you might get your arm chopped off while getting every device (or sleep) to work flawlessly, but once it works, it stays working. And small things like search work like you expect them to.

Re:macOS Ventura is now available by warning26 on Monday October 24, 2022 @05:42PM (#33323037)
I continue to not understand this -- The Everything app was capable of instant search on Windows in like 2008, and yet on modern devices, with SSDs, far more RAM, and faster CPUs, I have to wait a good 2-3s for results to appear.

How did one dev managed to achieve what, apparently, no corporate entity ever has?

Re:macOS Ventura is now available by vvilliamperez on Monday October 24, 2022 @03:07PM (#33320984)
I'm still on Monty, does this work? https://imgur.com/a/ExV2wrP
Re:macOS Ventura is now available by kayodelycaon on Monday October 24, 2022 @03:24PM (#33321235)
You can do name:searchitem and it'll find by name.
Re:macOS Ventura is now available by rcarmo on Monday October 24, 2022 @03:08PM (#33320988)
What I typically do is remove _anything_ (web suggestions, etc.) that is not related to files. Usually fixes Spotlight across the board.
Re:macOS Ventura is now available by ggandhi on Monday October 24, 2022 @03:05PM (#33320949)
Re:macOS Ventura is now available by dorian-graph on Monday October 24, 2022 @03:58PM (#33321748)
Having grown tired of the design of Alfread and not wanting to commit to VC-backed Raycast, this is a nice discovery! Edit: A plugin system is on the TODO and that'd be the clincher.
Re:macOS Ventura is now available by artificialLimbs on Monday October 24, 2022 @03:06PM (#33320959)
Basic file search is broken. Still nothing like VoidTools Everything-like SMB share indexing either. Maybe Spacedrive will have these things when released? *crosses fingers
Re:macOS Ventura is now available by samlader on Monday October 24, 2022 @03:58PM (#33321752)
I recommend checking out Raycast as an alternative.

https://www.raycast.com/

Re:macOS Ventura is now available by jbverschoor on Monday October 24, 2022 @04:02PM (#33321814)
Raycast is great. imo better than Alfred. Love the menu-search functionality.

But I still use both, because Raycast doesn't support "folder search". I use folders in general because they don't change, and I usually know what I'm looking for. It (should be)/is also faster than searching all files.

When I'm looking for a file or it's contents, I'll fall back to spotlight

Re:macOS Ventura is now available by DavideNL on Monday October 24, 2022 @05:05PM (#33322656)
Re:macOS Ventura is now available by behnamoh on Monday October 24, 2022 @04:00PM (#33321775)
I think Apple should just buy Raycast.
Re:macOS Ventura is now available by insane_dreamer on Monday October 24, 2022 @04:19PM (#33322083)
Or Alfred, been around much longer.
Re:macOS Ventura is now available by viktorcode on Monday October 24, 2022 @04:23PM (#33322159)
Just start typing the name. Not in the search field of Finder. You'll get focus on a file or folder that starts with whatever symbols you just typed. Very convenient and fast. Having "sort by name" by default in every folder helps a lot too.
Re:macOS Ventura is now available by wyuenho on Monday October 24, 2022 @04:25PM (#33322196)
You can just start typing in Finder, prefix search will Just Work.
Re:macOS Ventura is now available by mcfedr on Monday October 24, 2022 @04:26PM (#33322212)
What's crazy, is that presumably, this is the default because some definition of "most people" just randomly save files all over the place
Re:macOS Ventura is now available by wingworks on Tuesday October 25, 2022 @12:11AM (#33326117)
Yep, most non tech people I've met often have files saved everywhere and anywhere. They don't know where stuff goes half the time.
Re:macOS Ventura is now available by natch on Monday October 24, 2022 @04:44PM (#33322462)
in Terminal:

find . -type f -name “somestring”

but yeah that seems like more typing than one might want compared to a simple text entry field in the GUI.

Re:macOS Ventura is now available by wlonkly on Monday October 24, 2022 @10:16PM (#33325381)
For what it's worth, the terminal interface to the Spotlight database is "mdfind". It still doesn't solve GP's "only this directory" problem though.

(But your "find" will search in and below the current directory for files that exactly match "somestring".)

Re:macOS Ventura is now available by natch on Tuesday October 25, 2022 @02:21PM (#33334292)
>For what it's worth, the terminal interface to the Spotlight database is "mdfind".

Yeah I realize that, but find is a stronger tool for the use case because it also allows wildcards to be specified in the name.

>your "find" will search in and below

Your "mdfind" will also search in and below the current directory.

find also has -depth which can be used to tell it to search only this directory.

mdfind has -onlyin to tell it what directory to search in, but it still recurses down. Does it have an option to limit this? Please do tell.

>for files that exactly match "somestring"

Well find also allows wildcards though. So not necessarily exactly… somestring is just an example.

Does mdfind allow wildcards?

Also find is fun to combine with grep to inspect file contents, especially since it has the -print0 option…

    find . -type f -name "*.py" -print0 | xargs -0 grep somestring 
Please tell me how to do this with mdfind, I would love to know!
Re:macOS Ventura is now available by snoopy_telex on Wednesday October 26, 2022 @03:13PM (#33348025)
you could also just have find run the grep for you as well

    `find . -type f -name \*.py -exec grep homestring {} \;`
It's not exactly equivalent, however, I often will just use find directly for simple actions.
Re:macOS Ventura is now available by wlonkly on Sunday October 30, 2022 @10:58AM (#33395003)
mdfind searches contents by default, thanks to the Spotlight index.
Re:macOS Ventura is now available by m000 on Monday October 24, 2022 @04:56PM (#33322594)
What do you mean "still mostly useless"? Is there anything more usable on any other OS?

I moved back to Windows a couple of years back. Spotlight is the second thing I miss most from macOS, with the first being Preview.

Re:macOS Ventura is now available by mehrshad on Monday October 24, 2022 @05:05PM (#33322655)
Microsoft's PowerToys has a great answer to Spotlight on Windows if you're so inclined to try it out.

[0] https://learn.microsoft.com/en-us/windows/powertoys/

Re:macOS Ventura is now available by fake-name on Tuesday October 25, 2022 @02:27AM (#33326959)
Mentioned elsewhere, Everything search by voidtools: https://www.voidtools.com. It does funky things with monitoring some component of the NTFS filesystem to maintain a up-to-date index of every filename on your computer, and makes them searchable literally as fast as you can type.

(https://news.ycombinator.com/item?id=33321000)

There seems to be two kind of searching people do. Some people want a search tool that searches in documents. Some people want a search tool that searches filenames.

Everything search is exclusively the second. I think I can count on one hand the number of times I've wanted to search inside documents in the last 10+ years (and for those cases, grep has worked fine, even on windows!).

For some reason, searching inside documents seems to be the default for both windows and os x search, and it's super annoying.

Re:macOS Ventura is now available by m000 on Tuesday October 25, 2022 @03:44PM (#33335231)
> I think I can count on one hand the number of times I've wanted to search inside documents in the last 10+ years

If you want to search documents you have created, I can imagine that you may not use the feature much. But e.g. for research papers, the downloaded copy rarely reflects the contents/authors, so it is really handy to be able to search the contents.

> For some reason, searching inside documents seems to be the default for both windows and os x search, and it's super annoying.

Weird. For me windows don't seem to search inside documents, or at least not in all documents.

Re:macOS Ventura is now available by yodsanklai on Monday October 24, 2022 @05:48PM (#33323090)
> Spotlight is still mostly useless.

I use it all the time to run binaries. For instance, "cmd-space mail". I wouldn't know the names of the files I want to search anyway.

Re:macOS Ventura is now available by singularity2001 on Monday October 24, 2022 @06:19PM (#33323392)
after many years I still often type "⌘space email" and find nothing.
Re:macOS Ventura is now available by tacker2000 on Monday October 24, 2022 @06:47PM (#33323660)
Indeed. Also, Outloook for Mac also uses Spotlight to search emails and this seems to break for a lot of people.

The only way to fix it is to do some command line mumbo jumbo like rebuilding the Spotlight index and deleting index folders.

Re:macOS Ventura is now available by yawnxyz on Monday October 24, 2022 @07:26PM (#33324010)
Spotlight is great for those lone cold weather nights: whenever I feel down, it will start indexing and spin up all the fans and make a lot of heat and noise, making me feel warm and loved
Re:macOS Ventura is now available by sbf501 on Monday October 24, 2022 @11:04PM (#33325685)
I still use it as fast calculator. And sometimes it can convert units ... sometimes. That's it. I don't think it has EVERY found the file I'm looking for, but Windows search ain't much better. As someone who develops on all three OSes daily, nothing beats `find | grep` or `find | xargs grep`.
Re:macOS Ventura is now available by dwaite on Tuesday October 25, 2022 @01:06AM (#33326461)
One trick is to know that spotlight indexes content and metadata separately, and most search interfaces default to content. Typing in "README.md" in system spotlight will look for documents that contain a reference to that name, while "name:README.MD" will look for ones marked as _having_ that name.

The search interface in finder has a builder for predicates (start a search then hit the plus on the right side of the search bar). There you can start to see some of the friendly prefixes for filesystem items such as extension:, kind:, date:, tag:.

You can also see the mass of file specific metadata - like width, audio bit rate, city, genre.

I have not, however, found a handy way to translate between English description, friendly prefix, and the internal query names like kMDItemContentType.

Fun aside - some of these used to work in the Mac app store - for instance, you could search for listed applications which could open exotic document types.

The "uselessness" IMHO is mostly in that it exposes the most simplistic interface possible, and people just don't know where to go from there (other than terminal users going `man mdfind` I suppose). That gap is only widened by how different it is from other filesystem-based mechanisms for power users, which have more established commonalities like regex and filesystem globbing.

Re:macOS Ventura is now available by zestyping on Thursday October 27, 2022 @05:46AM (#33355345)
I know you can specify these predicates; the problem is the absolutely terrible choice of default behaviour.
Re:macOS Ventura is now available by cr4nberry on Tuesday October 25, 2022 @04:44AM (#33327878)
Imo grep and fd are the most consistent way, all these GUI apps do is get in the way and reinvent the wheel
Re:macOS Ventura is now available by d12bb on Tuesday October 25, 2022 @05:02AM (#33328024)
As you're already using fd for find, you may like ripgrep for replacing grep.
Re:macOS Ventura is now available by garyclarke27 on Tuesday October 25, 2022 @05:21AM (#33328173)
Finder and File organization is the worst part of Mac experience, it's terrible - I still can't get used to it after 3 years. Windows Explorer is so much better. Aswell as not searching the current folder, I find it so infuriating that Save-As does not default to the Current folder, just picks a random one!!
Re:macOS Ventura is now available by mellavora on Tuesday October 25, 2022 @06:03AM (#33328451)
fd

https://github.com/sharkdp/fd#installation

assuming you are "in the current folder" in the terminal...

Re:macOS Ventura is now available by chatmasta on Tuesday October 25, 2022 @09:49AM (#33330420)
Personally I have Spotlight indexing completely disabled, except to index items in `/Applications` so I can use it as a quick-launcher. This was not easy to configure, and I'll probably have to do it again next time I update the OS. But it did seem to help with performance - Spotlight was often the cause of unpredictably high CPU usage spikes.
Re:macOS Ventura is now available by boesboes on Tuesday October 25, 2022 @10:00AM (#33330558)
If I'm recall correctly, it was pretty much perfect in the first few releases. It got worse and worse over the years when they added smart features.

But maybe that more nostalgia than actual memories ;)

Re:macOS Ventura is now available by bdlowery on Tuesday October 25, 2022 @10:32AM (#33330970)
There’s one simple solution… buy Alfred.
Re:macOS Ventura is now available by dev_tty01 on Tuesday October 25, 2022 @07:11PM (#33337469)
>not start a sluggish scan of my entire hard disk

A Spotlight search never starts a scan of your disk. The disk is always fully indexed and returns results out of the index very fast. The only exception is typically when the system is updated (or some other big event) and it reindexes everything.

That being said, as others have pointed out, there is a setting to make a Finder window search apply only to the directory in the current window.

Re:macOS Ventura is now available by jjav on Thursday October 27, 2022 @12:35AM (#33353161)
> Does anyone know a workable alternative?

Terminal and /usr/bin/find