I want to find a file on my macbook with the filename "abc.dmg". I've tried to use spotlight, but it doesn't find it. I've tried find (find -name abc.dmg -path /) but get errors back.
What is the proper syntax on a Mac?
In it's simplest form, find takes one parameter, the path, in it's actually worthful form, it takes the path, and then narrowing criteria.
Thus, you want, find (the program), / (the path), and -name abc.dmg (the criteria).
|show 1 more comment|
The simplest way (which I'm sure you've already tried, but hey, let me add it to the thread anyway) is to enter abc.dmg into the search box on the top right of any finder window, then select "File Name" from the options on the Search Bar that appears.
No need for the terminal.
Also remember that Spotlight only indexes directories specified in the Spotlight control panel and abc.dmg may not be in one of those directories.
Correct me if i'm wrong, but i think the find command needs to know what to output:
...should print any results to the terminal (including permission errors).
If you don't want permission errors and want to search other User directories then: