abhishek abhishek - 4 months ago 11
Linux Question

"locate" Linux command alternative for mac OSX

In Linux, we can use the

locate
command to find the files from the terminal.
Is there any command available for Mac OSX which works same as the
locate
command?

I want to find a file in complete filesystem accessible by User(Me) in mac OSX. Can it be done with some command from the terminal?

This command should show me the list of all paths where the file of the same name is available.

Answer

I guess the mdfind command is what your are looking for:

mdfind -name test.pdf