using locate
instead of find
would be almost instant but idk if macs come with mlocate/etc installed by default.
everyone should know about mlocate
locate
does:
$ locate idonotexist $ echo $? 1
From the locate
manpage:
> EXIT STATUS > locate exits with status 0 if any match was found or if locate was > invoked with one of the --limit 0, --help, --statistics or --version > options. If no match was found or a fatal error was encountered, > locate exits with status 1.
At least for mlocate, which is the default on my Debian system.