| KEXTFIND(8) | System Manager's Manual | KEXTFIND(8) |
kextfind — find
kernel extensions (kexts) based on a variety of criteria and print
information
kextfind |
[options] [--]
[kext_or_directory ...]
[query] [-report
[-no-header]
report_predicate ...] |
The kextfind utility has been deprecated.
Please use the kmutil(8) equivalent:
kmutil find.
The kextfind utility locates and prints
information, or generates reports, about kernel extensions (kexts) matching
the search criteria in query from among those in the
named directory and extension arguments. If no directories or extensions are
specified, kextfind searches
/System/Library/Extensions and /Library/Extensions. Searches are performed
via kext management logic as used by
kextload(8) and
kextd(8), by which only kexts directly
in the repository directory or kexts explicitly named (and their immediate
plugins) are eligible; this is specifically not an exhaustive, recursive
filesystem search.
Construct your search using any of the query and command
predicates listed below. You can combine predicates with the logical
operators -and, -or, and
-not, and group them with parentheses.
Query command predicates generally print some bit of information
about a kext, such as its pathname or bundle identifier, followed by either
a newline or an ASCII NUL. You can also generate a tab-delimited report
using the -report keyword after the query
expression; if you do, you must not specify any of the command predicates
described below.
If no command predicate or report is specified,
kextfind implicitly executes a
-print command predicate for each kext matching the
query.
-h,
-help-set-arch
arch-i,
-case-insensitive-s,
-substring-no-paths-relative-paths-0,
-nul-echo and all
-print... command predicates except for
-print-diagnostics emit an ASCII NUL character
(character code 0) in place of any newlines. This is useful when sending
the output to xargs(1). You can also
use this flag individually with those command predicates.-f
kext_or_directory,
-search-item
kext_or_directory-e,
-system-extensions--Descriptions of all available search criteria and commands follow, grouped by general category.
Most of these predicates take the
-case-insensitive (-i) and
-substring (-s) options as
described above.
-b
[-i|-case-insensitive]
[-s|-substring]
identifier-bundle-id
[-i|-case-insensitive]
[-s|-substring]
identifier-property
CFBundleIdentifier
identifier.-dup-duplicate-id-B
[-i|-case-insensitive]
[-s|-substring]
name-bundle-name
[-i|-case-insensitive]
[-s|-substring]
name-m
[-i|-case-insensitive]
[-s|-substring]
name value-match-property
[-i|-case-insensitive]
[-s|-substring]
name valuetrue”,
“yes”,
“1” or
“false”,
“no”,
“0”) for the named property.-me
name-match-property-exists
name-p
[-i|-case-insensitive]
[-s|-substring]
name value-property
[-i|-case-insensitive]
[-s|-substring]
name valuetrue”,
“yes”,
“1” or
“false”,
“no”,
“0”) for the named property.-pe
name-property-exists
name-a,
-authentic-d,
-dependencies-met-nd,
-dependencies-missing-na,
-inauthentic-nv,
-invalid-l,
-loadable-loaded-nl,
-nonloadable-v,
-valid-w,
-warnings-arch
arch1[,arch2...]-ax
arch1[,arch2...],
-arch-exact
arch1[,arch2...]-dsym
symbol, -defines-symbol
symbol-library).-x,
-executable-nx,
-no-executable-rsym
symbol, -references-symbol
symbol-debug-has-plugins-integrity
{
correct|modified|no-receipt|not-apple|unknown
}-kernel-resource-lib,
-library-pluginThese options find kexts that are used at startup or allowed to
load during safe boot. They should be combined with the
-or operator. (The standard system mkext file
contains console, local-root, and root kexts, so you would specify
“\( -console -or -local-root -or -root
\)”.
-C,
-console-p OSBundleRequired
Console but always case-sensitive).-L,
-local-root-p OSBundleRequired
Local-Root but always case-sensitive).-N,
-network-root-p OSBundleRequired
Network-Root but always case-sensitive).-R,
-root-p OSBundleRequired Root
but always case-sensitive).-S,
-safe-boot-p OSBundleRequired 'Safe
Boot' but always case-sensitive).-compatible-with-version
version-V
[ne|gt|ge|lt|le]version[-version]-version
[ne|gt|ge|lt|le]version[-version]-library.These predicates print information about kexts that match the
query, or run a utility on the kext bundle directory, its info dictionary
file, or its executable. Execpt for -exec, these all
have a true result for purposes of query evaluation.
The -echo and all
-print... command predicates except for
-print-diagnostics accept a
-nul (-0) option to emit an
ASCII NUL character (character code 0) in place of any newlines. This is
useful when sending the output to
xargs(1).
-echo
[-n|-no-newline]
[-0|-nul]
string-n or -no-newline to omit
the newline. If you specify both -n and
-nul, string is not followed
by either a newline or an ASCII NUL character.-exec
utility [argument
...] ;;”). If you invoke
kextfind from a shell you may need to quote the
semicolon if the shell would otherwise treat it as a control operator. The
strings “{}”,
“{info-dictionary}”, and
“{executable}”, appearing anywhere
in the utility name or the arguments are replaced by the pathname of the
current kext, its info dictionary, or its executable, respectively.
utility will be executed from the directory from
which kextfind was executed.
utility and arguments are not
subject to the further expansion of shell patterns and constructs.-print
[-0|-nul](
query )
-and -print.-print0-print -nul,
for all you find(1) users out
there.-pa
[-0|-nul]-print-arches
[-0|-nul]-print-dependencies
[-0|-nul]-print-dependents
[-0|-nul]-pdiag-print-diagnostics-px
[-0|-nul]-print-executable
[-0|-nul]-pid
[-0|-nul]-print-info-dictionary
[-0|-nul]-exec cat {info-dictionary} \;” or
“-exec pl -input {info-dictionary}
\;” to print the contents of the file.)-print-integrity
[-0|-nul]-print-plugins
[-0|-nul]-pm
[-0|-nul]
name-print-match-property
[-0|-nul]
name-pp
[-0|-nul]
name-print-property
[-0|-nul]
nameThe query primaries may be combined using the following operators. The operators are listed in order of decreasing precedence.
(
expression )!
expression-not
expression!” is a special character and must
be escaped or quoted.-and
expression-or
expression-or operator is the logical OR operator. It
evaluates to true if either expression is true. If the first expression is
true, the second expression is not evaluated.Use the following predicates in a report expression to generate a
tab-delimited format, one kext per line, suitable for further processing (or
immediate edification). The report normally starts with a header line
labeling each column; you can skip this by following
-report directly with
-no-header.
The report predicate keywords are almost all the same as query
predicates, but have different purposes (and arguments in several cases). In
general, where a query predicate is looking for a value, a report predicate
is retrieving it. Thus, the property predicates only take the name of the
property, and print the value of that property for the kext being examined.
Report predicates based on attributes with multiple values, such as
-print-dependencies, print the number of values
rather than the values themselves. Finally, report predicates for yes/no
questions print “yes” or “no”.
Note that many shorthands for inverted meanings, such as
-invalid, are not available for reports (they would
only be confusing). Others, such as -match-property,
could generate multiple values that would be impossible to embed
meaningfully in plain tab-delimited text (and knowing how many of them there
are is not useful).
-b,
-bundle-id-B,
-bundle-name-integrity,
-print-integrity-V,
-version-print-pa,
-print-arches-print-dependencies-print-dependents-px,
-print-executable-pid,
-print-info-dictionary-print-plugins-p
name, -property
name-pp
name, -print-property
name<null>”.-sym
symbol, -symbol
symbol-arch
arch1[,arch2...]yes” if the kexts contains
all the named architectures (and possibly others),
“no” otherwise.-ax
arch1[,arch2...],
-arch-exact
arch1[,arch2...]yes” if the kexts contains
exactly
the named architectures (and no others),
“no” otherwise.-a,
-authentic-debug-d,
-dependencies-met-dup,
-duplicate-identifier-x,
-executable-has-plugins-kernel-resource-lib,
-library-l,
-loadable-loaded-plugin-w,
-warnings-v,
-validThe following examples are shown as given to the shell:
kextfind
-case-insensitive -not -bundle-id -substring 'com.apple.'
-printkextfind
\( -nonloadable -or -warnings \) -print -print-diagnosticskextfind
-nonloadable -print-dependents | sort | uniqkextfind
-defines-symbol __ZTV14IONetworkStackkextfind
-relative-paths -arch-exact ppc,i386kextfind
-debug -print -pp OSBundleDebugLevel -pm IOKitDebugkextfind
-m IOProviderClass IOMedia -print -exec pl -input {info-dictionary}
;kextfind
-no-paths -nl -report -print -v -a -dThe kextfind utility exits with a status
of 0 on completion (whether or not any kexts are found), or with a nonzero
status if an error occurs.
find(1), kmutil(8), kernelmanagerd(8), kextcache(8), kextd(8), kextload(8), kextstat(8), kextunload(8), xargs(1)
Many single-letter options are inconsistent in meaning with (or directly contradictory to) the same letter options in other kext tools.
Several special characters used by
kextfind are also special characters to many shell
programs. In particular, the characters
“!”,
“(”, and
“)”, may have to be escaped from the
shell.
| November 14, 2012 | Darwin |