Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #164
Difficulty: Easy
Developers began to abandon MINIX after free and open-source Unix-like operating systems such as Linux and 386BSD became available in the early 1990s.
True or False?
Linux & Unix Commands - Search Man Pages

mdfind(1) [osx man page]

mdfind(1)						    BSD General Commands Manual 						 mdfind(1)

mdfind -- finds files matching a given query SYNOPSIS
mdfind [-live] [-count] [-onlyin directory] [-name fileName] query DESCRIPTION
The mdfind command consults the central metadata store and returns a list of files that match the given metadata query. The query can be a string or a query expression. The following options are available: -0 Prints an ASCII NUL character after each result path. This is useful when used in conjunction with xargs -0. -live Causes the mdfind command to provide live-updates to the number of files matching the query. When an update causes the query results to change the number of matches is updated. The find can be cancelled by typing ctrl-C. -count Causes the mdfind command to output the total number of matches, instead of the path to the matching items. -onlyin dir Limit the scope of the search to the directory specified. -name fileName Searches for matching file names only. -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 metadata attribute: mdfind "kMDItemAuthor == '*MyFavoriteAuthor*'" This returns all files with any metadata attribute value matching the string "skateboard". The find continues to run after gathering the initial results, providing 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) Mac OS X June 10, 2004 Mac OS X

Check Out this Related Man Page

wsreg_query_set_unique_name(3WSREG)		    Product Install Registry Library Functions		       wsreg_query_set_unique_name(3WSREG)

wsreg_query_set_unique_name, wsreg_query_get_unique_name - set or get the unique name of a query SYNOPSIS
cc [flag ...] file ...-lwsreg [library ...] #include <wsreg.h> int wsreg_query_set_unique_name(Wsreg_query *query, const char *unique_name); char *wsreg_query_get_unique_name(const Wsreg_query *query); DESCRIPTION
The wsreg_query_set_unique_name() function sets the unique name specified by unique_name in the query specified by query. If a unique name has already been set in the specified query, the resources associated with the previously set unique name are released. The wsreg_query_get_unique_name() function gets the unique name string from the query specified by query. The resulting string is not a copy and must not be released by the caller. RETURN VALUES
The wsreg_query_set_unique_name() function returns a non-zero value if the unique_name was set correctly; otherwise 0 is returned. The wsreg_query_get_unique_name() function returns a copy of the unique_name from the specified query. USAGE
The query identifies fields used to search for a specific component in the product install registry. By specifying the unique name, the component search is narrowed to all components in the product install registry that have the specified unique name. Other fields can be specified in the same query to further narrow the search. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
wsreg_get(3WSREG), wsreg_initialize(3WSREG), wsreg_query_create(3WSREG), attributes(5) SunOS 5.10 22 Sep 2000 wsreg_query_set_unique_name(3WSREG)

Featured Tech Videos