Skoro sam saznao da pored standardne find komande (koja je dostupna i na drugim UNIX sistemima); OS X ima i mdfind komandu, koja koristi Spotlight za pretraživanje i pretražuje i skrivene direktorijume (koje Spotlight obično ne prikazuje kada se nešto traži preko njegovog GUI-ja).
Korisna stvar ako imate potrebu da tražite sistemske fajlove.
Evo uputstvo (koje se dobija kada se ukuca man mdfind).
[code:1] -literal Force the provided query string to be taken as a literal query string,
without interpretation.
-interpret Force the provided query string to be interpreted as if the user had
typed the string into the Spotlight menu. For example, the string
‘search’ would produce the following query string:
(* = search* cdw || kMDItemTextContent = search* cdw)
EXAMPLES
The following examples are shown as given to the shell.
This returns all files with any metadata attribute value matching the string
‘image’:
mdfind image
This returns all files that contain ‘MyFavoriteAuthor’ in the kMDItemAuthor meta-
data attribute:
mdfind ‘kMDItemAuthors == ‘*MyFavoriteAuthor*’‘
This returns all files with any metadata attribute value matching the string
‘skateboard’. The find continues to run after gathering the initial results, pro-
viding a count of the number of files that match the query.
mdfind -live skateboard
To get a list of the available attributes for use in constructing queries, see
mdimport(1); particularly the -X switch.
SEE ALSO
mdimport(1); mdls(1); mdutil(1); xargs(1)[/code:1]