Quickly Finding files in macOS with mdfind

macOS Mojave

I’ve just learned about a super cool command in macOS: mdind. It consults a database to find files using type or filename. mdfind is quite similar to locate command, I think, but more powerful?

Find file by filename with mdfind

macOS comes with Apache webserver pre-installed – you just need to configure and active it. It starts with httpd.conf file, that is tricky to find unless you know where to look.

mdfind instantly solves this challenge:

greys@maverick:~ $ mdfind -name httpd.conf
/private/etc/apache2/httpd.conf.pre-update
/private/etc/apache2/original/httpd.conf
/private/etc/apache2/httpd.conf

See Also