|
NAMEkldfind - find kernel modules by stringSYNOPSISkldfind [-qv] -c category ... kldfind [-qv] -s string ... kldfind -h DESCRIPTIONTo find kernel modules more easily, the script accept these arguments:OPTIONS-h display a short help text-c use to find kld by category -s match strings for all kld's -v increase verbose display, with short description and sumary for all modules' directories -q quiet; does not write anything to standard output, return 0 if any match befound but strings for all kld's EXAMPLESAll occurrents for acpi category using the default output (short)kldfind -c acpi /boot/kernel/acpi_asus.ko /boot/kernel/acpi_fujitsu.ko /boot/kernel/acpi_ibm.ko /boot/kernel/acpi_panasonic.ko /boot/kernel/acpi_sony.ko /boot/kernel/acpi_toshiba.ko /boot/kernel/acpi_video.ko /boot/kernel/acpi_dock.ko Now using verbose output: kldfind -vc acpi ====> Search finished, 8 resultes for /boot/kernel KLD Description --- ----------- ===> acpi_asus, --- Asus Laptop Extras ===> acpi_fujitsu, --- Fujitsu Laptop Extras ===> acpi_ibm, --- ACPI extras driver for IBM laptops ===> acpi_panasonic, --- ACPI hotkey driver for Panasonic laptops ===> acpi_sony, --- ACPI notebook controller driver for Sony laptops ===> acpi_toshiba, --- Toshiba HCI interface ===> acpi_video, --- ACPI Video Extensions driver ===> acpi_dock, --- No manual entry for acpi_dock Parse all output by any matching string using the default output (short) kldfind -s es137x /boot/kernel/snd_es137x.ko Now, using verbose output: kldfind -vs es137x ====> Search finished, 1 resultes for /boot/kernel KLD Description --- ----------- ===> snd_es137x, --- Ensoniq AudioPCI ES137x bridge device drive Is possible to use kldfind in your script without shell redirect, using quiet output if kldfind -qs unknown;then echo YES;else echo NO;fi NO if kldfind -qs geom_gate;then echo YES;else echo NO;fi YES EXIT STATUSkldfind returns a zero exit status if it succeeds, a non-zero value is returned in case of failure.AUTHORRicardo A. Reis <ricardo.areis@gmail.com>SEE ALSOkldstat(8),kldload(8),kldconfig(8)
Visit the GSP FreeBSD Man Page Interface. |